ccsoft  0.0.0
Convolutional codes library with soft decision decoding
ccsoft::CC_Encoding< T_Register, T_IOSymbol > Class Template Reference

Convolutional encoding class. Supports any k,n with k<n. The input bits of a symbol are clocked simultaneously into the right hand side, or least significant position of the internal registers. Therefore the given polynomial representation of generators should follow the same convention. More...

#include <CC_Encoding.h>

Inheritance diagram for ccsoft::CC_Encoding< T_Register, T_IOSymbol >:
Collaboration diagram for ccsoft::CC_Encoding< T_Register, T_IOSymbol >:

List of all members.

Public Member Functions

 CC_Encoding (const std::vector< unsigned int > &_constraints, const std::vector< std::vector< T_Register > > &_genpoly_representations)
virtual ~CC_Encoding ()
void clear ()
virtual T_Register & get_register (unsigned int index)
const std::vector< T_Register > & get_registers () const
void set_registers (const std::vector< T_Register > &_registers)

Protected Attributes

std::vector< T_Register > registers
 Memory registers as many as there are inputs.

Detailed Description

template<typename T_Register, typename T_IOSymbol>
class ccsoft::CC_Encoding< T_Register, T_IOSymbol >

Convolutional encoding class. Supports any k,n with k<n. The input bits of a symbol are clocked simultaneously into the right hand side, or least significant position of the internal registers. Therefore the given polynomial representation of generators should follow the same convention.

Template Parameters:
T_Registertype of the internal registers
T_IOSymboltype used to pass input and output symbols

Constructor & Destructor Documentation

template<typename T_Register , typename T_IOSymbol >
ccsoft::CC_Encoding< T_Register, T_IOSymbol >::CC_Encoding ( const std::vector< unsigned int > &  _constraints,
const std::vector< std::vector< T_Register > > &  _genpoly_representations 
) [inline]

Constructor.

Parameters:
_constraintsVector of register lengths (constraint length + 1). The number of elements determines k.
_genpoly_representationsGenerator polynomial numeric representations. There are as many elements as there are input bits (k). Each element is itself a vector with one polynomial value per output bit. The smallest size of these vectors is retained as the number of output bits n. The input bits of a symbol are clocked simultaneously into the right hand side, or least significant position of the internal registers. Therefore the given polynomial representation of generators should follow the same convention.
                                                                                                                                :
        CC_Encoding_base<T_Register, T_IOSymbol>(_constraints, _genpoly_representations),
        registers(_constraints.size(),0)
    {
    }
template<typename T_Register , typename T_IOSymbol >
virtual ccsoft::CC_Encoding< T_Register, T_IOSymbol >::~CC_Encoding ( ) [inline, virtual]

Destructor

    {}

Member Function Documentation

template<typename T_Register , typename T_IOSymbol >
void ccsoft::CC_Encoding< T_Register, T_IOSymbol >::clear ( ) [inline]

Clear internal registers. Used before encoding a sequence

    {
        registers.assign(registers.size(), 0);
    }
template<typename T_Register , typename T_IOSymbol >
virtual T_Register& ccsoft::CC_Encoding< T_Register, T_IOSymbol >::get_register ( unsigned int  index) [inline, virtual]

Get a R/W reference to a regiser

Parameters:
indexIndex of the register

Implements ccsoft::CC_Encoding_base< T_Register, T_IOSymbol >.

    {
        return registers[index];
    }
template<typename T_Register , typename T_IOSymbol >
const std::vector<T_Register>& ccsoft::CC_Encoding< T_Register, T_IOSymbol >::get_registers ( ) const [inline]

Get registers reference

    {
        return registers;
    }
template<typename T_Register , typename T_IOSymbol >
void ccsoft::CC_Encoding< T_Register, T_IOSymbol >::set_registers ( const std::vector< T_Register > &  _registers) [inline]

Set registers

    {
        registers = _registers;
    }

Member Data Documentation

template<typename T_Register , typename T_IOSymbol >
std::vector<T_Register> ccsoft::CC_Encoding< T_Register, T_IOSymbol >::registers [protected]

Memory registers as many as there are inputs.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines