![]() |
ccsoft
0.0.0
Convolutional codes library with soft decision decoding
|
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>
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. | |
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.
| T_Register | Type of the encoder internal registers |
| T_IOSymbol | Type of the input and output symbols |
| T_EdgeTag | Type of the code tree node+edge tag |
| ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::CC_SequentialDecodingInternal | ( | ) | [inline] |
Constructor
| constraints | Vector of register lengths (constraint length + 1). The number of elements determines k. |
| genpoly_representations | Generator 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)
{}
| virtual ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::~CC_SequentialDecodingInternal | ( | ) | [inline, virtual] |
| 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
| node | Node to track back from |
| decoded_message | Symbols corresponding to the edge ordered from root node to the given node |
| mark_nodes | Mark 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());
}
| 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);
}
| float ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::log2 | ( | float | x | ) | [inline, protected] |
Base 2 logarithm
{
return log(x)/log(2.0);
}
| 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
| os | Output stream |
{
CC_TreeGraphviz<T_IOSymbol, T_Register, T_Tag>::create_dot(root_node, os);
}
| void ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::reset | ( | ) | [inline] |
Reset the decoding process
Reimplemented in ccsoft::CC_FanoDecoding< T_Register, T_IOSymbol >, and ccsoft::CC_StackDecoding< T_Register, T_IOSymbol >.
| 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
| node | Node to visit |
| relmat | Reliability matrix reference |
Implemented in ccsoft::CC_FanoDecoding< T_Register, T_IOSymbol >, and ccsoft::CC_StackDecoding< T_Register, T_IOSymbol >.
CC_TreeNodeEdge<T_IOSymbol, T_Register, T_Tag>* ccsoft::CC_SequentialDecodingInternal< T_Register, T_IOSymbol, T_Tag >::root_node [protected] |
Root node.