Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

simthlib::ConstellationDiagram Class Reference

Abstract base class for constellation diagrams. More...

#include <modulationschemes.h>

Inheritance diagram for simthlib::ConstellationDiagram:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ConstellationDiagram (unsigned bitsPerSymb)
virtual ~ConstellationDiagram ()
unsigned getBitsPerSymbol () const
const simth::ComplexgetComplSymbol (unsigned symbolIndex) const
unsigned getNumStates () const
void scaleConstellation (const simth::Complex &scaleFactor)
const simth::ComplexhardDecision (const simth::Complex &r) const
virtual void print (std::ostream &os, bool gnuplotFormat=false) const

Protected Member Functions

virtual void setComplSymbols (unsigned symbolIndex, const simth::Complex &newValue)
virtual void initComplSymbols ()=0

Detailed Description

Abstract base class for constellation diagrams.

The class ConstellationDiagram is an abstract base class wich provides an interface for a particular constellation diagram class (e.g. a PSK constellation diagramm class).

A modulation scheme defines points in an m-dimensional signal space (see Proakis, Digital Communications) used to transmit information in a digital transmission system. Actually, the modulation schemes declared in this file deals with two-dimensional signal spaces only. Therefore, the modulation schemes defined here can be described as a mapping between a two dimensional vector within the signal space and a so-called symbol index.

This (and the derived classes) performs an association between a finite number of bits (represented by an integer value) and the corresponding points in the constellation diagram or more precisely in the two-dimensional signal space (see Proakis, Digital Communications) represented here by the complex plane.

The points in the constellation diagram are represented by the so-called symbol indexes. The complex value that corresponds to a certain symbol index is returned by the public member function getComplSymbol().

The number of bits per symbol, respective the number of (different) symbol indexes, is passed as an argument of the constructor.


Constructor & Destructor Documentation

simthlib::ConstellationDiagram::ConstellationDiagram unsigned  bitsPerSymb  ) 
 

Class constructor.

Parameters:
bitsPerSymb Bits per symbol in the constellation diagram.

virtual simthlib::ConstellationDiagram::~ConstellationDiagram  )  [virtual]
 

Virtual destructor.


Member Function Documentation

unsigned simthlib::ConstellationDiagram::getBitsPerSymbol  )  const [inline]
 

Returns the number of bits per symbol, as specified in the constructor.

const simth::Complex & simthlib::ConstellationDiagram::getComplSymbol unsigned  symbolIndex  )  const [inline]
 

Returns the complex value corresponding to the given symbol-index.

This function is inline, hence it is supposed to be quite fast.

unsigned simthlib::ConstellationDiagram::getNumStates  )  const [inline]
 

Returns the modulation valency of the constellation diagram, or, more precisely, returns the number of transmit vectors within the (arbitrary) two-dimensional signal space. (FIXME: "transmitted" or "transmission" ?)

const simth::Complex& simthlib::ConstellationDiagram::hardDecision const simth::Complex r  )  const
 

Make a hard decision on the input symbol r by returning the complex symbol from the constellation that has the minimum euclidian distance from the given input symbol.

virtual void simthlib::ConstellationDiagram::initComplSymbols  )  [protected, pure virtual]
 

The derived functions of this pure virtual function determines the allocation between the symbol indexes and the complex values in the constellation diagram. The pairs of complex value and symbol index are set by using this function initComplSymbols() which has to be overridden by derived classes.

This derived function has to be called in the constructor of the derived class!

We use this somehow weird approach so that the getComplSymbol() function can be left non-virtual so that it can be inlined.

Implemented in simthlib::QamConstellationDiagram.

virtual void simthlib::ConstellationDiagram::print std::ostream &  os,
bool  gnuplotFormat = false
const [virtual]
 

Print some information about this diagram

void simthlib::ConstellationDiagram::scaleConstellation const simth::Complex scaleFactor  ) 
 

Scales the constellation diagram, i.e. all points within the signal space are multiplied with the given complex factor.

virtual void simthlib::ConstellationDiagram::setComplSymbols unsigned  symbolIndex,
const simth::Complex newValue
[protected, virtual]
 

Sets the complex value corresponding to the given symbol index.

Exceptions:
std::out\_of\_range if symbolIndex is greater than the modulation valency or less than zero


Generated on Tue Aug 9 14:38:35 2005 for simtheticlib by  doxygen 1.4.1