DefaultNodeInserter Class Reference

The default node inserter, inserts nodes at fixed intervalls. More...

#include <DefaultNodeInserter.hpp>

Inheritance diagram for DefaultNodeInserter:

IGNGNodeInserter SGNGNodeInserter List of all members.

Public Member Functions

 DefaultNodeInserter ()
virtual void SetGNGContainer (IGNGContainer *c)
 Sets the IGNGContainer component of DefaultNodeInserter.

virtual bool IsInsertCriteriaMet ()
 Checks if the insert new node criteria is met.

virtual void InsertNewNode ()
 Inserts a new Node, at the apropriate postition.

void SetParamInsertEvery (unsigned int i)
 Sets the InsertEvery parameter.

void SetParamMaxNodes (unsigned int i)
 Sets the MaxNodes parameter.

void SetParamNewNodePos (double i)
 Sets the NewNodePos parameter.

void SetParamErrorDecay (double i)
 Sets the ErrorDecay parameter.


Protected Member Functions

virtual GNGNodeFindNodeWithLargestError ()
 Finds the Node U with the largest local error.

virtual GNGNodeFindNeighborWithLargestError (GNGNode const &u)
 Finds the Neighbor V of node U with the largest error.

virtual double NewError (double errorU, double errorV)
 Defines how the new error is initialized for the new node.


Protected Attributes

unsigned int m_iteration
unsigned int m_paramInsertEvery
unsigned int m_paramMaxNodes
double m_paramNewNodePos
double m_paramErrorDecay
IGNGContainerm_container

Detailed Description

The default node inserter, inserts nodes at fixed intervalls.


Constructor & Destructor Documentation

DefaultNodeInserter  ) 
 


Member Function Documentation

void SetGNGContainer IGNGContainer c  )  [virtual]
 

Sets the IGNGContainer component of DefaultNodeInserter.

It is used to create edges and nodes. It is the actual container of the nodes and edges.

Parameters:
c the IGNGContainer component.

Implements IGNGNodeInserter.

bool IsInsertCriteriaMet  )  [virtual]
 

Checks if the insert new node criteria is met.

Returns:
true if criteria is met false otherwise.

Implements IGNGNodeInserter.

void InsertNewNode  )  [virtual]
 

Inserts a new Node, at the apropriate postition.

The IGNGContainer component managed nodes and edges and is used to create them.

Implements IGNGNodeInserter.

Reimplemented in SGNGNodeInserter.

void SetParamInsertEvery unsigned int  i  ) 
 

Sets the InsertEvery parameter.

It controls the frequency of insertions.

Parameters:
i the parameter value.

void SetParamMaxNodes unsigned int  i  ) 
 

Sets the MaxNodes parameter.

It controls how many nodes are allowed to be created.

Parameters:
i the parameter value.

void SetParamNewNodePos double  i  ) 
 

Sets the NewNodePos parameter.

It controls the interpolation between the two most erroneous nodes U and V. It should be a value between 0.0 and 1.0. 1.0 means the new node will be placed as far away from the most erroneous node U as possible, that is on the same spot as V. 0.0 means the new node will be placed in the same spot as U.

Parameters:
i the interpolation parameter.

void SetParamErrorDecay double  i  ) 
 

Sets the ErrorDecay parameter.

It scales the local error of the nodes U and V with the hightst error after a new node has been inserted between U and V. It should be a value between 0.0 and 1.0. 1.0 leaves the error intact and 0.0 makes the error 0.0.

GNGNode * FindNodeWithLargestError  )  [protected, virtual]
 

Finds the Node U with the largest local error.

Returns:
the node U with the largest local error.

GNGNode * FindNeighborWithLargestError GNGNode const &  u  )  [protected, virtual]
 

Finds the Neighbor V of node U with the largest error.

Returns:
the node V.

double NewError double  errorU,
double  errorV
[protected, virtual]
 

Defines how the new error is initialized for the new node.

Parameters:
errorU the error of the winner-node
errorV the error of the second closest node
Returns:
the new error


Member Data Documentation

unsigned int m_iteration [protected]
 

unsigned int m_paramInsertEvery [protected]
 

unsigned int m_paramMaxNodes [protected]
 

double m_paramNewNodePos [protected]
 

double m_paramErrorDecay [protected]
 

IGNGContainer* m_container [protected]
 


Generated on Mon Mar 22 16:40:48 2004 for GNG_GL by doxygen 1.3.6