![]()  | 
  
  
  
    ccsoft
    0.0.0
    
   Convolutional codes library with soft decision decoding 
   | 
  
  
  
 
A node in the code tree. More...
#include <CC_TreeNode.h>
Public Member Functions | |
| CC_TreeNode (unsigned int _id, CC_TreeEdge< T_IOSymbol, T_Register, T_EdgeTag > *_p_incoming_edge, float _path_metric, int _depth) | |
| ~CC_TreeNode () | |
| void | add_outgoing_edge (CC_TreeEdge< T_IOSymbol, T_Register, T_EdgeTag > *p_outgoing_edge) | 
| void | delete_outgoing_edges () | 
| const std::vector< CC_TreeEdge < T_IOSymbol, T_Register, T_EdgeTag > * > &  | get_outgoing_edges () const | 
| std::vector< CC_TreeEdge < T_IOSymbol, T_Register, T_EdgeTag > * > &  | get_outgoing_edges () | 
| CC_TreeEdge< T_IOSymbol,  T_Register, T_EdgeTag > *  | get_incoming_edge () | 
| float | get_path_metric () const | 
| int | get_depth () const | 
| unsigned int | get_id () const | 
| bool | operator< (const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > &other) const | 
| bool | operator> (const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > &other) const | 
| const std::vector< T_Register > & | get_registers () const | 
| void | set_registers (const std::vector< T_Register > &_registers) | 
| void | set_on_final_path (bool _on_final_path=true) | 
| bool | is_on_final_path () | 
| bool | operator< (const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > &other) | 
| bool | operator> (const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > &other) | 
Protected Attributes | |
| unsigned int | id | 
| Node's unique ID.   | |
| std::vector< CC_TreeEdge < T_IOSymbol, T_Register, T_EdgeTag > * >  | p_outgoing_edges | 
| Outgoing edges pointers.   | |
| CC_TreeEdge< T_IOSymbol,  T_Register, T_EdgeTag > *  | p_incoming_edge | 
| Pointer to the incoming edge.   | |
| float | path_metric | 
| Path metric to the node.   | |
| int | depth | 
| Depth of node in the tree: 0 = root.   | |
| std::vector< T_Register > | registers | 
| state of encoder registers at node   | |
| bool | on_final_path | 
| Marks node when backtracking the solution.   | |
A node in the code tree.
| T_IOSymbol | Type of the input and output symbols | 
| T_Register | Type of the encoder internal registers | 
| ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::CC_TreeNode | ( | unsigned int | _id, | 
| CC_TreeEdge< T_IOSymbol, T_Register, T_EdgeTag > * | _p_incoming_edge, | ||
| float | _path_metric, | ||
| int | _depth | ||
| ) |  [inline] | 
        
Constructor
| _id | Unique ID of the edge | 
| _p_incoming_edge | Pointer to the incoming edge to the node | 
| _path_metric | Path metric at the node | 
| _depth | This node depth | 
                        :
                id(_id),
                p_incoming_edge(_p_incoming_edge),
                path_metric(_path_metric),
                depth(_depth),
                on_final_path(false)
    {}
| ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::~CC_TreeNode | ( | ) |  [inline] | 
        
Destructor. Destroys all outgoing edges
    {
        delete_outgoing_edges();
    }

| void ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::add_outgoing_edge | ( | CC_TreeEdge< T_IOSymbol, T_Register, T_EdgeTag > * | p_outgoing_edge | ) |  [inline] | 
        
Add an outgoing edge
    {
        p_outgoing_edges.push_back(p_outgoing_edge);
    }
| void ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::delete_outgoing_edges | ( | ) |  [inline] | 
        
Delete outgoing edges
    {
        typename std::vector<CC_TreeEdge<T_IOSymbol, T_Register, T_EdgeTag>*>::iterator e_it = p_outgoing_edges.begin();
    
        for (; e_it != p_outgoing_edges.end(); ++e_it)
        {
            if (*e_it)
            {
                delete *e_it;
                *e_it = 0;
            }
        }
        p_outgoing_edges.clear();
    }
| int ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::get_depth | ( | ) |  const [inline] | 
        
Get the depth of the node
    {
        return depth;
    }
| unsigned int ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::get_id | ( | ) |  const [inline] | 
        
Get node id
    {
        return id;
    }
| CC_TreeEdge<T_IOSymbol, T_Register, T_EdgeTag>* ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::get_incoming_edge | ( | ) |  [inline] | 
        
Get pointer to the incoming edge
    {
        return p_incoming_edge;
    }
| const std::vector<CC_TreeEdge<T_IOSymbol, T_Register, T_EdgeTag>*>& ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::get_outgoing_edges | ( | ) |  const [inline] | 
        
Return a R/O reference to the outgoing edges
    {
        return p_outgoing_edges;
    }
| std::vector<CC_TreeEdge<T_IOSymbol, T_Register, T_EdgeTag>*>& ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::get_outgoing_edges | ( | ) |  [inline] | 
        
Return a R/W reference to the outgoing edges
    {
        return p_outgoing_edges;
    }
| float ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::get_path_metric | ( | ) |  const [inline] | 
        
Get path metric to the node
    {
        return path_metric;
    }
| const std::vector<T_Register>& ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::get_registers | ( | ) |  const [inline] | 
        
Get saved encoder registers reference
    {
        return registers;
    }
| bool ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::is_on_final_path | ( | ) |  [inline] | 
        
Test the "on final path" marker
    {
        return on_final_path;
    }
| bool ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::operator< | ( | const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > & | other | ) |  const [inline] | 
        
For ordering by increasing path metric
    {
        return path_metric < other.path_metric;
    }
| bool ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::operator< | ( | const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > & | other | ) |  [inline] | 
        
Ordering - lesser
    {
        if (path_metric == other.path_metric)
        {
            return id < other.id;
        }
        else
        {
            return path_metric < other.path_metric;
        }
    }
| bool ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::operator> | ( | const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > & | other | ) |  const [inline] | 
        
For ordering by decreasing path metric
    {
        return path_metric > other.path_metric;
    }
| bool ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::operator> | ( | const CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag > & | other | ) |  [inline] | 
        
Ordering - greater
    {
        if (path_metric == other.path_metric)
        {
            return id > other.id;
        }
        else
        {
            return path_metric > other.path_metric;
        }
    }
| void ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::set_on_final_path | ( | bool | _on_final_path = true | ) |  [inline] | 
        
Set the "on final path" marker
    {
        on_final_path = _on_final_path;
    }
| void ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::set_registers | ( | const std::vector< T_Register > & | _registers | ) |  [inline] | 
        
Save encoder registers
    {
        registers = _registers;
    }
int ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::depth [protected] | 
        
Depth of node in the tree: 0 = root.
unsigned int ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::id [protected] | 
        
Node's unique ID.
bool ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::on_final_path [protected] | 
        
Marks node when backtracking the solution.
CC_TreeEdge<T_IOSymbol, T_Register, T_EdgeTag>* ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::p_incoming_edge [protected] | 
        
Pointer to the incoming edge.
std::vector<CC_TreeEdge<T_IOSymbol, T_Register, T_EdgeTag>*> ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::p_outgoing_edges [protected] | 
        
Outgoing edges pointers.
float ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::path_metric [protected] | 
        
Path metric to the node.
std::vector<T_Register> ccsoft::CC_TreeNode< T_IOSymbol, T_Register, T_EdgeTag >::registers [protected] | 
        
state of encoder registers at node