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

Convolutional soft-decision sequential decoder generic (virtual) class for algorithm internal use. It is tainted by the type of code tree node+edge tag that is algorithm dependant. It contains the code tree root node and some common methods. This version uses a fixed array to store forward node+edges pointers. N_k template parameter gives the size of the input symbol (k parameter). There are (1<<N_k) forward node+edges. More...

#include <CC_SequentialDecodingInternal_FA.h>

List of all members.

Public Member Functions

 CC_SequentialDecodingInternal_FA ()
virtual ~CC_SequentialDecodingInternal_FA ()
void reset ()

Protected Member Functions

float log2 (float x)
void init_root ()
virtual void visit_node_forward (CC_TreeNodeEdge_FA< T_IOSymbol, T_Register, T_Tag, N_k > *node, const CC_ReliabilityMatrix &relmat)=0
void back_track (CC_TreeNodeEdge_FA< T_IOSymbol, T_Register, T_Tag, N_k > *node_edge, std::vector< T_IOSymbol > &decoded_message, bool mark_nodes=false)
void print_dot_internal (std::ostream &os)

Protected Attributes

CC_TreeNodeEdge_FA< T_IOSymbol,
T_Register, T_Tag, N_k > * 
root_node
 Root node.

Detailed Description

template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
class ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >

Convolutional soft-decision sequential decoder generic (virtual) class for algorithm internal use. It is tainted by the type of code tree node+edge tag that is algorithm dependant. It contains the code tree root node and some common methods. This version uses a fixed array to store forward node+edges pointers. N_k template parameter gives the size of the input symbol (k parameter). There are (1<<N_k) forward node+edges.

Template Parameters:
T_RegisterType of the encoder internal registers
T_IOSymbolType of the input and output symbols
T_EdgeTagType of the code tree node+edge tag
N_kSize of an input symbol in bits (k parameter)

Constructor & Destructor Documentation

template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::CC_SequentialDecodingInternal_FA ( ) [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.
                                           :
        root_node(0)
        {}
template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
virtual ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::~CC_SequentialDecodingInternal_FA ( ) [inline, virtual]

Destructor

        {
        if (root_node)
        {
            delete root_node;
            root_node = 0;
        }
        }

Member Function Documentation

template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
void ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::back_track ( CC_TreeNodeEdge_FA< T_IOSymbol, T_Register, T_Tag, N_k > *  node_edge,
std::vector< T_IOSymbol > &  decoded_message,
bool  mark_nodes = false 
) [inline, protected]

Back track from a node. When the node is the selected terminal node it is used to retrieve the decoded message

Parameters:
nodeNode to track back from
decoded_messageSymbols corresponding to the edge ordered from root node to the given node
mark_nodesMark the nodes along the path
    {
        std::vector<T_IOSymbol> reversed_message;
        CC_TreeNodeEdge_FA<T_IOSymbol, T_Register, T_Tag, N_k> *cur_node_edge = node_edge;
        CC_TreeNodeEdge_FA<T_IOSymbol, T_Register, T_Tag, N_k> *incoming_node_edge;

        reversed_message.push_back(cur_node_edge->get_in_symbol());

        while (incoming_node_edge = (cur_node_edge->get_incoming_node_edge()))
        {
            cur_node_edge->set_on_final_path(mark_nodes);

            if (incoming_node_edge->get_depth() >= 0) // don't take root node
            {
                reversed_message.push_back(incoming_node_edge->get_in_symbol());
            }

            cur_node_edge = incoming_node_edge;
        }

        decoded_message.resize(reversed_message.size());
        std::reverse_copy(reversed_message.begin(), reversed_message.end(), decoded_message.begin());
    }
template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
void ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::init_root ( ) [inline, protected]

Initialize process at the root node

    {
        root_node = new CC_TreeNodeEdge_FA<T_IOSymbol, T_Register, T_Tag, N_k>(0, 0, 0, 0.0, 0.0, -1);
    }
template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
float ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::log2 ( float  x) [inline, protected]

Base 2 logarithm

    {
        return log(x)/log(2.0);
    }
template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
void ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::print_dot_internal ( std::ostream &  os) [inline, protected]

Print the code tree in Graphviz dot format

Parameters:
osOutput stream
    {
        CC_TreeGraphviz_FA<T_IOSymbol, T_Register, T_Tag, N_k>::create_dot(root_node, os);
    }
template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
void ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::reset ( ) [inline]
template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
virtual void ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::visit_node_forward ( CC_TreeNodeEdge_FA< T_IOSymbol, T_Register, T_Tag, N_k > *  node,
const CC_ReliabilityMatrix relmat 
) [protected, pure virtual]

Visit a new node in the code tree

Parameters:
nodeNode to visit
relmatReliability matrix reference

Implemented in ccsoft::CC_FanoDecoding_FA< T_Register, T_IOSymbol, N_k >, and ccsoft::CC_StackDecoding_FA< T_Register, T_IOSymbol, N_k >.


Member Data Documentation

template<typename T_Register, typename T_IOSymbol, typename T_Tag, unsigned int N_k>
CC_TreeNodeEdge_FA<T_IOSymbol, T_Register, T_Tag, N_k>* ccsoft::CC_SequentialDecodingInternal_FA< T_Register, T_IOSymbol, T_Tag, N_k >::root_node [protected]

Root node.


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