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

simthlib::ConvCodeTrellis Class Reference

#include <trellis.h>

Inheritance diagram for simthlib::ConvCodeTrellis:

Inheritance graph
[legend]
List of all members.

Public Types

enum  StartingMode { FREE, ZERO, AMBIGOUS }

Public Member Functions

 ConvCodeTrellis (int states, int inbits, int outbits, StartingMode startingMode)
virtual ~ConvCodeTrellis ()
 Destructor.
void printStateDiagram (std::ostream &os) const
virtual simth::BitSeqEncode (const simth::BitSeq &) const
 encodes a bit sequence
virtual void Encode (const simth::BitSeq &bsin, simth::BitSeq *bsout) const

Protected Member Functions

virtual int getNextState (int state, int input, size_t step, size_t path_length) const
virtual int getNextOut (int state, int input, size_t step, size_t path_length) const
virtual int getPrevState (int state, int index, size_t step, size_t path_length) const
virtual int getPrevOut (int state, int index, size_t step, size_t path_length) const
virtual int getPrevIn (int state, int index, size_t step, size_t path_length) const
virtual const Trellis::TrellisStatesArraygetPrevTrellisArray (size_t time_step, size_t path_length) const
ConvCodeTrellis::StartingMode startingMode () const
virtual bool isPossibleStartingState (int state) const =0
virtual int terminationInput (int state) const

Protected Attributes

Trellis::TrellisStatesArray forward
 branches of the code trellis (forward)
Trellis::TrellisStatesArray back
 branches of the code trellis (back)
simth::Array< int > terminationInput_
Trellis::TrellisStatesArray terminationForward
Trellis::TrellisStatesArray terminationBack

Detailed Description

This class provides a Trellis specialized to the use of a convolutional code. This class overwrites the pure virtual functions (getNextState(..),...) of the base class Trellis.


Member Enumeration Documentation

enum simthlib::ConvCodeTrellis::StartingMode
 

Starting mode of the trellis: ZERO should be used for a conventional convolutional code, AMBIGOUS should be used for a differential code.

Enumeration values:
FREE 
ZERO 
AMBIGOUS 


Constructor & Destructor Documentation

simthlib::ConvCodeTrellis::ConvCodeTrellis int  states,
int  inbits,
int  outbits,
StartingMode  startingMode
 

Constructor to build a trellis with the given number of states, input and output bits and the specified starting mode.

The starting mode defines, which states are allowed starting states, e.g. ZERO means that each path starts from the all-zero-state.

Parameters:
states The number of states.
inbits The number of uncoded input bits per step
outbits The number of coded bits per step.
startingMode For conventional codes the starting mode should be set to 'ZERO'.

virtual simthlib::ConvCodeTrellis::~ConvCodeTrellis  )  [virtual]
 

Destructor.


Member Function Documentation

virtual void simthlib::ConvCodeTrellis::Encode const simth::BitSeq bsin,
simth::BitSeq bsout
const [virtual]
 

virtual simth::BitSeq* simthlib::ConvCodeTrellis::Encode const simth::BitSeq  )  const [virtual]
 

encodes a bit sequence

int simthlib::ConvCodeTrellis::getNextOut int  state,
int  input,
size_t  step,
size_t  path_length
const [inline, protected, virtual]
 

Returns the coder output according to a given previous state and input for the given coding step.

Implements simthlib::Trellis.

int simthlib::ConvCodeTrellis::getNextState int  state,
int  input,
size_t  step,
size_t  path_length
const [inline, protected, virtual]
 

Returns the next coder state according to a given previous state and input for the given coding step. The parameter step is required because of the corresponding virtual function in Trellis. However, the result is independent of step here.

Implements simthlib::Trellis.

int simthlib::ConvCodeTrellis::getPrevIn int  state,
int  index,
size_t  step,
size_t  path_length
const [inline, protected, virtual]
 

Returns the previous coder input according to a given current state and number of the trellis branch leading to this state in the previous coding step.

Implements simthlib::Trellis.

int simthlib::ConvCodeTrellis::getPrevOut int  state,
int  index,
size_t  step,
size_t  path_length
const [inline, protected, virtual]
 

Returns the previous coder output according to a given current state and number of the trellis branch leading to this state in the previous coding step.

Implements simthlib::Trellis.

int simthlib::ConvCodeTrellis::getPrevState int  state,
int  index,
size_t  step,
size_t  path_length
const [inline, protected, virtual]
 

Returns the previous coder state according to a given current state and number of the trellis branch leading to this state in the previous coding step.

Implements simthlib::Trellis.

const Trellis::TrellisStatesArray & simthlib::ConvCodeTrellis::getPrevTrellisArray size_t  time_step,
size_t  path_length
const [inline, protected, virtual]
 

Returns the argument to getPrevArray_state() according to the given time step and path length.

Implements simthlib::Trellis.

virtual bool simthlib::ConvCodeTrellis::isPossibleStartingState int  state  )  const [protected, pure virtual]
 

Returns true if the given state is a possible starting state. The result depends on the starting mode set by the constructor argument.

Implements simthlib::Trellis.

Implemented in simthlib::ConvCodeTrellisShiftRegister, and simthlib::ConvCodeTrellisExplicit.

void simthlib::ConvCodeTrellis::printStateDiagram std::ostream &  os  )  const
 

Reimplemented from simthlib::Trellis.

ConvCodeTrellis::StartingMode simthlib::ConvCodeTrellis::startingMode  )  const [inline, protected]
 

virtual int simthlib::ConvCodeTrellis::terminationInput int  state  )  const [protected, virtual]
 

Returns in order to a definite state of the trellis the termination input. If the recursive polynom is zero, the termination input is zero independend from the state of the trellis.

Implements simthlib::Trellis.


Member Data Documentation

Trellis::TrellisStatesArray simthlib::ConvCodeTrellis::back [protected]
 

branches of the code trellis (back)

Trellis::TrellisStatesArray simthlib::ConvCodeTrellis::forward [protected]
 

branches of the code trellis (forward)

Trellis::TrellisStatesArray simthlib::ConvCodeTrellis::terminationBack [protected]
 

Trellis::TrellisStatesArray simthlib::ConvCodeTrellis::terminationForward [protected]
 

simth::Array<int> simthlib::ConvCodeTrellis::terminationInput_ [protected]
 


Generated on Tue Aug 9 14:39:44 2005 for simtheticlib by  doxygen 1.4.1