ccsoft  0.0.0
Convolutional codes library with soft decision decoding
ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag > 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. More...

#include <CC_SequentialDecodingInternal.h>

List of all members.

Public Member Functions

 CC_SequentialDecodingInternal ()
virtual ~CC_SequentialDecodingInternal ()
void reset ()

Protected Member Functions

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

Protected Attributes

CC_TreeNodeEdge< T_IOSymbol,
T_Register, T_Tag > * 
root_node
 Root node.

Detailed Description

template<typename T_Register, typename T_IOSymbol, typename T_Tag>
class ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >

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.

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

Constructor & Destructor Documentation

template<typename T_Register, typename T_IOSymbol, typename T_Tag>
ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::CC_SequentialDecodingInternal ( ) [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>
virtual ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::~CC_SequentialDecodingInternal ( ) [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>
void ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::back_track ( CC_TreeNodeEdge< T_IOSymbol, T_Register, T_Tag > *  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<T_IOSymbol, T_Register, T_Tag> *cur_node_edge = node_edge;
        CC_TreeNodeEdge<T_IOSymbol, T_Register, T_Tag> *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>
void ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::init_root ( ) [inline, protected]

Initialize process at the root node

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

Base 2 logarithm

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

Print the code tree in Graphviz dot format

Parameters:
osOutput stream
    {
        CC_TreeGraphviz<T_IOSymbol, T_Register, T_Tag>::create_dot(root_node, os);
    }
template<typename T_Register, typename T_IOSymbol, typename T_Tag>
void ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::reset ( ) [inline]
template<typename T_Register, typename T_IOSymbol, typename T_Tag>
virtual void ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::visit_node_forward ( CC_TreeNodeEdge< T_IOSymbol, T_Register, T_Tag > *  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< T_Register, T_IOSymbol >, and ccsoft::CC_StackDecoding< T_Register, T_IOSymbol >.


Member Data Documentation

template<typename T_Register, typename T_IOSymbol, typename T_Tag>
CC_TreeNodeEdge<T_IOSymbol, T_Register, T_Tag>* ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::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