StringTreeNode Class Reference

#include <StringTreeNode.h>

List of all members.

Public Member Functions

 StringTreeNode (string name)
 ~StringTreeNode (void)
void attachSuffix (StringTreeNode *nodeRef)
void pushCount ()
void normalize (float absCt)
void truncate ()
void sortByDensity ()
list< StringTreeNode * > & getChildren ()
string getName ()
float getDensity ()
void cleanup ()

Private Attributes

string myName
float density
list< StringTreeNode * > children


Detailed Description

Data structure required for storing the processed string. This is a node of a string representing the relations of the string terms between each other. A child node corresponds to a suffix of the current term

Constructor & Destructor Documentation

StringTreeNode::StringTreeNode ( string  name  ) 

Constructs a new node with the given term

StringTreeNode::~StringTreeNode ( void   ) 


Member Function Documentation

void StringTreeNode::attachSuffix ( StringTreeNode nodeRef  ) 

Attaches a new suffix as child node

void StringTreeNode::cleanup (  ) 

Frees memory recursively

list< StringTreeNode * > & StringTreeNode::getChildren (  ) 

Returns a reference to the child nodes

float StringTreeNode::getDensity (  ) 

Returns the relative density

std::string StringTreeNode::getName (  ) 

Returns the contained term

void StringTreeNode::normalize ( float  absCt  ) 

Normalizes the frequency of this term in the text to the interval [ 0, 1 ], where absCt is the total count of words in the text

void StringTreeNode::pushCount (  ) 

Increases the number of occurences of this term in the text by one

void StringTreeNode::sortByDensity (  ) 

Sorts the child nodes by their density

void StringTreeNode::truncate (  ) 

Nodes containing only one child node are merged to a common node


Member Data Documentation

float StringTreeNode::density [private]

string StringTreeNode::myName [private]


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

Generated on Tue Jun 8 15:23:24 2010 for WordTree by  doxygen 1.5.7.1