![]() |
ccsoft
0.0.0
Convolutional codes library with soft decision decoding
|
Convolutional soft-decision sequential decoder generic (virtual) class. This is the public interface. This version uses a fixed array to store registers. N_k template parameter gives the size of the input symbol (k parameter) and therefore the number of registers. More...
#include <CC_SequentialDecoding_FA.h>
Public Member Functions | |
CC_SequentialDecoding_FA (const std::vector< unsigned int > &constraints, const std::vector< std::vector< T_Register > > &genpoly_representations) | |
virtual | ~CC_SequentialDecoding_FA () |
void | set_node_limit (unsigned int _node_limit) |
void | reset_node_limit () |
void | set_metric_limit (float _metric_limit) |
void | reset_metric_limit () |
void | set_tail_zeros (bool _tail_zeros) |
void | reset () |
CC_Encoding_FA< T_Register, T_IOSymbol, N_k > & | get_encoding () |
float | get_score () const |
float | get_score_db_sym () const |
unsigned int | get_nb_nodes () const |
unsigned int | get_current_depth () const |
unsigned int | get_max_depth () const |
void | set_edge_bias (float _edge_bias) |
void | set_verbosity (unsigned int _verbosity) |
virtual void | print_dot (std::ostream &os)=0 |
virtual void | print_stats (std::ostream &os, bool success)=0 |
virtual bool | decode (const CC_ReliabilityMatrix &relmat, std::vector< T_IOSymbol > &decoded_message)=0 |
Protected Attributes | |
CC_Encoding_FA< T_Register, T_IOSymbol, N_k > | encoding |
Convolutional encoding object. | |
bool | use_metric_limit |
True if a give up path metric threshold is used. | |
float | metric_limit |
The give up path metric threshold. | |
bool | use_node_limit |
Stop above number of nodes threshold. | |
unsigned int | node_limit |
Number of nodes threshold. | |
float | codeword_score |
Metric of the codeword found if any. | |
int | cur_depth |
Current depth for the encoder. | |
int | max_depth |
Maximum depth reached in the graph. | |
unsigned int | node_count |
Count of nodes in the code tree. | |
bool | tail_zeros |
True if tail of m-1 zeros in the message are assumed. This is the default option. | |
float | edge_bias |
Edge metric bias subtracted from log2 of reliability of the edge. | |
unsigned int | verbosity |
Verbosity level. |
Convolutional soft-decision sequential decoder generic (virtual) class. This is the public interface. This version uses a fixed array to store registers. N_k template parameter gives the size of the input symbol (k parameter) and therefore the number of registers.
T_Register | Type of the encoder internal registers |
T_IOSymbol | Type of the input and output symbols |
N_k | Size of an input symbol in bits (k parameter) |
ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::CC_SequentialDecoding_FA | ( | const std::vector< unsigned int > & | constraints, |
const std::vector< std::vector< T_Register > > & | genpoly_representations | ||
) | [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. |
: encoding(constraints, genpoly_representations), use_metric_limit(false), metric_limit(0.0), use_node_limit(false), node_limit(0), codeword_score(0.0), cur_depth(-1), max_depth(0), node_count(0), tail_zeros(true), edge_bias(0.0), verbosity(0) {}
virtual ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::~CC_SequentialDecoding_FA | ( | ) | [inline, virtual] |
Destructor
{ }
virtual bool ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::decode | ( | const CC_ReliabilityMatrix & | relmat, |
std::vector< T_IOSymbol > & | decoded_message | ||
) | [pure virtual] |
Decodes given the reliability matrix
relmat | Reference to the reliability matrix |
decoded_message | Vector of symbols of retrieved message |
Implemented in ccsoft::CC_FanoDecoding_FA< T_Register, T_IOSymbol, N_k >, and ccsoft::CC_StackDecoding_FA< T_Register, T_IOSymbol, N_k >.
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::get_current_depth | ( | ) | const [inline] |
Get the current depth
{ return cur_depth; }
CC_Encoding_FA<T_Register, T_IOSymbol, N_k>& ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::get_encoding | ( | ) | [inline] |
Get encoding object reference
{ return encoding; }
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::get_max_depth | ( | ) | const [inline] |
Get the maximum depth reached
{ return max_depth; }
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::get_nb_nodes | ( | ) | const [inline] |
Get the number of nodes created minus root node
{ return node_count; }
float ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::get_score | ( | ) | const [inline] |
Get the codeword score. Valid only if decode returned successfully.
{ return codeword_score; }
float ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::get_score_db_sym | ( | ) | const [inline] |
Get the codeword score in dB/Symbol units. Valid only if decode returned successfully.
{ if (cur_depth > 0) { return (10.0*log(2.0)*codeword_score) / cur_depth; } else { return 0.0; } }
virtual void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::print_dot | ( | std::ostream & | os | ) | [pure virtual] |
Print the dot (Graphviz) file of the current decode tree to an output stream
os | Output stream |
Implemented in ccsoft::CC_FanoDecoding_FA< T_Register, T_IOSymbol, N_k >, and ccsoft::CC_StackDecoding_FA< T_Register, T_IOSymbol, N_k >.
virtual void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::print_stats | ( | std::ostream & | os, |
bool | success | ||
) | [pure virtual] |
Print statistics to an output stream
os | Output stream |
success | true if decoding was successful |
Implemented in ccsoft::CC_FanoDecoding_FA< T_Register, T_IOSymbol, N_k >, and ccsoft::CC_StackDecoding_FA< T_Register, T_IOSymbol, N_k >.
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::reset | ( | ) | [inline] |
Reset the decoding process
Reimplemented in ccsoft::CC_FanoDecoding_FA< T_Register, T_IOSymbol, N_k >, and ccsoft::CC_StackDecoding_FA< T_Register, T_IOSymbol, N_k >.
{ node_count = 0; codeword_score = 0.0; cur_depth = -1; max_depth = 0; encoding.clear(); // clear encoder's registers }
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::reset_metric_limit | ( | ) | [inline] |
Reset the metric limit threshold. The process will continue until out of memory or end of the tree.
{ use_metric_limit = false; }
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::reset_node_limit | ( | ) | [inline] |
Reset the node limit threshold. The process will continue until out of memory or end of the tree.
{ use_node_limit = false; }
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::set_edge_bias | ( | float | _edge_bias | ) | [inline] |
Set the edge metric bias
{ edge_bias = _edge_bias; }
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::set_metric_limit | ( | float | _metric_limit | ) | [inline] |
Set the metric limit threshold
{ metric_limit = _metric_limit; use_metric_limit = true; }
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::set_node_limit | ( | unsigned int | _node_limit | ) | [inline] |
Set the node limit threshold
{ node_limit = _node_limit; use_node_limit = true; }
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::set_tail_zeros | ( | bool | _tail_zeros | ) | [inline] |
Set the tail zeros option
{ tail_zeros = _tail_zeros; }
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::set_verbosity | ( | unsigned int | _verbosity | ) | [inline] |
Set verbosity level
{ verbosity = _verbosity; }
float ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::codeword_score [protected] |
Metric of the codeword found if any.
int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::cur_depth [protected] |
Current depth for the encoder.
float ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::edge_bias [protected] |
Edge metric bias subtracted from log2 of reliability of the edge.
CC_Encoding_FA<T_Register, T_IOSymbol, N_k> ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::encoding [protected] |
Convolutional encoding object.
int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::max_depth [protected] |
Maximum depth reached in the graph.
float ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::metric_limit [protected] |
The give up path metric threshold.
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::node_count [protected] |
Count of nodes in the code tree.
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::node_limit [protected] |
Number of nodes threshold.
bool ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::tail_zeros [protected] |
True if tail of m-1 zeros in the message are assumed. This is the default option.
bool ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::use_metric_limit [protected] |
True if a give up path metric threshold is used.
bool ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::use_node_limit [protected] |
Stop above number of nodes threshold.
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::verbosity [protected] |
Verbosity level.