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

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>

Inheritance diagram for ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >:

List of all members.

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.

Detailed Description

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

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.

Template Parameters:
T_RegisterType of the encoder internal registers
T_IOSymbolType of the input and output symbols
N_kSize of an input symbol in bits (k parameter)

Constructor & Destructor Documentation

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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

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

Destructor

        {
        }

Member Function Documentation

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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

Parameters:
relmatReference to the reliability matrix
decoded_messageVector 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 >.

template<typename T_Register , typename T_IOSymbol , unsigned int 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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
        }
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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

Parameters:
osOutput stream

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

template<typename T_Register , typename T_IOSymbol , unsigned int 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

Parameters:
osOutput stream
successtrue 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 >.

template<typename T_Register , typename T_IOSymbol , unsigned int 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
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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;
    }
template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
void ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::set_verbosity ( unsigned int  _verbosity) [inline]

Set verbosity level

    {
        verbosity = _verbosity;
    }

Member Data Documentation

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
float ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::codeword_score [protected]

Metric of the codeword found if any.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::cur_depth [protected]

Current depth for the encoder.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
CC_Encoding_FA<T_Register, T_IOSymbol, N_k> ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::encoding [protected]

Convolutional encoding object.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::max_depth [protected]

Maximum depth reached in the graph.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
float ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::metric_limit [protected]

The give up path metric threshold.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::node_count [protected]

Count of nodes in the code tree.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::node_limit [protected]

Number of nodes threshold.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
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.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
bool ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::use_node_limit [protected]

Stop above number of nodes threshold.

template<typename T_Register , typename T_IOSymbol , unsigned int N_k>
unsigned int ccsoft::CC_SequentialDecoding_FA< T_Register, T_IOSymbol, N_k >::verbosity [protected]

Verbosity level.


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