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

Represents a node and its incoming edge in the code tree. More...

#include <CC_TreeNodeEdge_base.h>

Inheritance diagram for ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >:
Collaboration diagram for ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >:

List of all members.

Public Member Functions

 CC_TreeNodeEdge_base (unsigned int _id, const T_IOSymbol &_in_symbol, float _incoming_edge_metric, float _path_metric, int _depth)
 ~CC_TreeNodeEdge_base ()
float get_path_metric () const
int get_depth () const
unsigned int get_id () const
bool operator< (const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &other) const
bool operator> (const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &other) const
void set_on_final_path (bool _on_final_path=true)
bool is_on_final_path ()
const T_IOSymbol & get_in_symbol () const
float get_incoming_metric () const
const T_Tag & get_tag () const
T_Tag & get_tag ()
bool operator< (const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &other)
bool operator> (const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &other)

Protected Attributes

unsigned int id
 Node-edge's unique ID.
T_IOSymbol in_symbol
 Input symbol corresponding to the edge.
float path_metric
 Path metric to the node.
float incoming_edge_metric
 metric of the incoming edge to the node
int depth
 Depth of node in the tree: 0 = root.
bool on_final_path
 Marks node when backtracking the solution.
T_Tag tag
 Optional and versatile object to tag the node+edge.

Detailed Description

template<typename T_IOSymbol, typename T_Tag>
class ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >

Represents a node and its incoming edge in the code tree.

Template Parameters:
T_IOSymbolType of the input and output symbols
T_TagType of the node-edge tag

Constructor & Destructor Documentation

template<typename T_IOSymbol, typename T_Tag>
ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::CC_TreeNodeEdge_base ( unsigned int  _id,
const T_IOSymbol &  _in_symbol,
float  _incoming_edge_metric,
float  _path_metric,
int  _depth 
) [inline]

Constructor

Parameters:
_idUnique ID of the edge
_in_symbolInput symbol corresponding to the edge
_metricMetric of the edge
_path_metricPath metric at the node
_depthThis node depth
                        :
                id(_id),
                in_symbol(_in_symbol),
                incoming_edge_metric(_incoming_edge_metric),
                path_metric(_path_metric),
                depth(_depth),
                on_final_path(false)
    {}
template<typename T_IOSymbol, typename T_Tag>
ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::~CC_TreeNodeEdge_base ( ) [inline]

Destructor

        {
        }

Member Function Documentation

template<typename T_IOSymbol, typename T_Tag>
int ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::get_depth ( ) const [inline]

Get the depth of the node

    {
        return depth;
    }
template<typename T_IOSymbol, typename T_Tag>
unsigned int ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::get_id ( ) const [inline]

Get node id

    {
        return id;
    }
template<typename T_IOSymbol, typename T_Tag>
const T_IOSymbol& ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::get_in_symbol ( ) const [inline]

Input symbol getter

    {
        return in_symbol;
    }
template<typename T_IOSymbol, typename T_Tag>
float ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::get_incoming_metric ( ) const [inline]

Incoming edge metric getter

    {
        return incoming_edge_metric;
    }
template<typename T_IOSymbol, typename T_Tag>
float ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::get_path_metric ( ) const [inline]

Get path metric to the node

    {
        return path_metric;
    }
template<typename T_IOSymbol, typename T_Tag>
const T_Tag& ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::get_tag ( ) const [inline]

R/O reference to tag

    {
        return tag;
    }
template<typename T_IOSymbol, typename T_Tag>
T_Tag& ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::get_tag ( ) [inline]

R/W reference to tag

    {
        return tag;
    }
template<typename T_IOSymbol, typename T_Tag>
bool ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::is_on_final_path ( ) [inline]

Test the "on final path" marker

    {
        return on_final_path;
    }
template<typename T_IOSymbol, typename T_Tag>
bool ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::operator< ( const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &  other) const [inline]

For ordering by increasing path metric

    {
        return path_metric < other.path_metric;
    }
template<typename T_IOSymbol, typename T_Tag>
bool ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::operator< ( const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &  other) [inline]

Ordering - lesser

    {
        if (path_metric == other.path_metric)
        {
            return id < other.id;
        }
        else
        {
            return path_metric < other.path_metric;
        }
    }
template<typename T_IOSymbol, typename T_Tag>
bool ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::operator> ( const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &  other) const [inline]

For ordering by decreasing path metric

    {
        return path_metric > other.path_metric;
    }
template<typename T_IOSymbol, typename T_Tag>
bool ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::operator> ( const CC_TreeNodeEdge_base< T_IOSymbol, T_Tag > &  other) [inline]

Ordering - greater

    {
        if (path_metric == other.path_metric)
        {
            return id > other.id;
        }
        else
        {
            return path_metric > other.path_metric;
        }
    }
template<typename T_IOSymbol, typename T_Tag>
void ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::set_on_final_path ( bool  _on_final_path = true) [inline]

Set the "on final path" marker

    {
        on_final_path = _on_final_path;
    }

Member Data Documentation

template<typename T_IOSymbol, typename T_Tag>
int ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::depth [protected]

Depth of node in the tree: 0 = root.

template<typename T_IOSymbol, typename T_Tag>
unsigned int ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::id [protected]

Node-edge's unique ID.

template<typename T_IOSymbol, typename T_Tag>
T_IOSymbol ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::in_symbol [protected]

Input symbol corresponding to the edge.

template<typename T_IOSymbol, typename T_Tag>
float ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::incoming_edge_metric [protected]

metric of the incoming edge to the node

template<typename T_IOSymbol, typename T_Tag>
bool ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::on_final_path [protected]

Marks node when backtracking the solution.

template<typename T_IOSymbol, typename T_Tag>
float ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::path_metric [protected]

Path metric to the node.

template<typename T_IOSymbol, typename T_Tag>
T_Tag ccsoft::CC_TreeNodeEdge_base< T_IOSymbol, T_Tag >::tag [protected]

Optional and versatile object to tag the node+edge.


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