ToPS
Public Member Functions
tops::ContextTreeNode Class Reference

This is a context tree node. More...

#include <ContextTree.hpp>

List of all members.

Public Member Functions

 ContextTreeNode (int alphabet_size)
 ContextTreeNode ()
 Default constructor.
void addCount (int s)
 Add a count to the symbol s.
void addCount (int s, double w)
 Add a count w to the symbol s.
void setCount (int s, double v)
 Add v to the counter to the symbol s.
std::vector< double > & getCounter ()
 get the counter
int alphabet_size ()
 Set the alphabet size.
void setParent (int parent)
 Set the parent id.
int getParent ()
 Get the parent id;.
void setId (int id)
 Set the id of the node.
void setChild (ContextTreeNodePtr child, int symbol)
 set the child for a given symbol
int symbol ()
 get the symbol of the node
void setSymbol (int symbol)
 get the symbol of the node
void setDistribution (DiscreteIIDModelPtr distribution)
 set the distribution of this context
ContextTreeNodePtr getChild (int symbol)
 get the child of a symbol
DiscreteIIDModelPtr getDistribution ()
 get the distribution of this context
void deleteChildren ()
 deletes the children of this contex
ContextTreeNodeVector getChildren ()
 Returns the children.
bool isLeaf ()
 returns true if this context node is a leaf

Detailed Description

This is a context tree node.

Definition at line 41 of file ContextTree.hpp.


Constructor & Destructor Documentation

Parameters:
alphabetis the alphabet to be used

Definition at line 70 of file ContextTree.cpp.


The documentation for this class was generated from the following files: