Machine Learning Library
Public Member Functions | Friends | List of all members
CHyperbolicTopology< Type > Class Template Reference

Topology class describing two dimensional hyperbolic lattice structure. More...

#include <CSOM.h>

Inheritance diagram for CHyperbolicTopology< Type >:
CSomTopology< Type >

Public Member Functions

 CHyperbolicTopology (int iNumNodes, int iNeighbours, int iRings, int iNumVisible=3)
 
virtual ~CHyperbolicTopology ()
 
void makeLattice ()
 Computes the coordinates of the lattice structure on Poincare Disk. More...
 
void rotateNode (int iCenter, int iFrom, int iTarget)
 
int addRing (int iFirst, int iLast)
 
void addTriangle (int i1, int i2, int i3)
 
void getInfo (vector< int > &viDims)
 
int translateGrid (float *pfTrans, float *pfTarget, int iMode=0)
 Translates grid structure. More...
 
void copyVisibleNodeCoordinates (float *pfTarget)
 
void setParameter (float *pfParam)
 Sets parameters. More...
 
void setNumVisibleRings (int iNumVisibleRings)
 
int getNumNodesUptoRing (int iRing)
 
int getNumPolyLines ()
 
bool getPolyLine (int iLine, int &riStart, int &riEnd)
 Returns true if requested polyline iLine is closed. More...
 
void train (CDataset< Type > &rtTrainSet, CSOM< Type > *pSOM)
 Use topology specific training algorithm to build SOM. More...
 
void trainGrowing (CDataset< Type > &rtTrainSet, CSOM< Type > *pSOM, float fGrowParam)
 
void performBeamSearch (int iRoot, int iLevel)
 
void buildDomains ()
 
void addPolyLinesFrom (int iNode)
 
void computeOutbounds (int iNode)
 
void computeOutbounds (int iNode, int iK)
 
int getNumOutbounds (int iNode, int iK=0)
 
int getOutBounds (int iNode)
 
void getOutBoundRange (int iNode, vector< int >::iterator &itStart, vector< int >::iterator &itEnd)
 
void setBeamBranching (int iBranch)
 
- Public Member Functions inherited from CSomTopology< Type >
 CSomTopology (int iNumNodes)
 
virtual ~CSomTopology ()
 
void setNodePosition (int i, CVector< double > &rtPos)
 
const CVector< double > & getNodePosition (int i)
 
const CVector< double > & getCenterPosition ()
 
void addLink (int iFrom, int iTo)
 
int getNumNeighbours (int i)
 
int getNumDomains ()
 
void addDomain (int iStart, int iEnd)
 
int getDomainStart (int iDomain)
 
int getDomainEnd (int iDomain)
 
int getDomainSize (int iDomain)
 
int getDomainOfNode (int iNode)
 
int getNeighbour (int iNode, int iPos)
 
int getCenterNode (bool bVisibleNodes)
 
int getType ()
 Returns type of topology. More...
 
void setType (int iNewType)
 
int getGeometrySize ()
 
int getGeometryPoint (int iPoint)
 

Friends

class CSOM< Type >
 

Additional Inherited Members

- Public Attributes inherited from CSomTopology< Type >
vector< bool > vbExpand
 each node possible carries an expand attribute More...
 
- Protected Attributes inherited from CSomTopology< Type >
int iType
 type of lattice topology More...
 
vector< vector< int > > vvNeighbours
 each node has a list of neighbours More...
 
CDataset< double > tNodes
 dataset of node coordinates More...
 
CDenseVector< double > tCenter
 vector describing topology center More...
 
vector< int > viGeometry
 geometry data for VTK More...
 
vector< int > viVisibleNode
 list of currently visible nodes More...
 
vector< int > viVisiblePos
 each visible node points to its "real" node More...
 
int iCenterNode
 
int iOldCenterNode
 
int iVisibleNodesCenter
 
int iNumVisibleNodes
 
vector< pair< int, int > > vDomains
 SOM area might consist of several domains. More...
 

Detailed Description

template<class Type>
class CHyperbolicTopology< Type >

Topology class describing two dimensional hyperbolic lattice structure.

Constructor & Destructor Documentation

template<class Type >
CHyperbolicTopology< Type >::CHyperbolicTopology ( int  iNumNodes,
int  iNeighbours,
int  iRings,
int  iNumVisible = 3 
)

Constructor creates 2 dimensional hyperbolic regular tesselation.

Parameters
iNumNodesNumber of nodes in lattice
iNeighboursNumber of neighbours for each node
iRingsNumber of rings in lattice
template<class Type >
virtual CHyperbolicTopology< Type >::~CHyperbolicTopology ( )
virtual

Member Function Documentation

template<class Type >
void CHyperbolicTopology< Type >::addPolyLinesFrom ( int  iNode)
template<class Type >
int CHyperbolicTopology< Type >::addRing ( int  iFirst,
int  iLast 
)

Adds complete ring to lattice structure

Parameters
iFirstNumber of first node in new ring
iLastNumber of last node in inner ring
template<class Type >
void CHyperbolicTopology< Type >::addTriangle ( int  i1,
int  i2,
int  i3 
)
template<class Type >
void CHyperbolicTopology< Type >::buildDomains ( )
virtual

Reimplemented from CSomTopology< Type >.

template<class Type >
void CHyperbolicTopology< Type >::computeOutbounds ( int  iNode)
template<class Type >
void CHyperbolicTopology< Type >::computeOutbounds ( int  iNode,
int  iK 
)
template<class Type >
void CHyperbolicTopology< Type >::copyVisibleNodeCoordinates ( float *  pfTarget)
template<class Type >
void CHyperbolicTopology< Type >::getInfo ( vector< int > &  viDims)
virtual

Returns dimension information

Parameters
viDimsReference to vector. For a two dimensional lattice structure viDims should contain two vector elements. Each element denotes the number of nodes along that dimension.

Reimplemented from CSomTopology< Type >.

template<class Type >
int CHyperbolicTopology< Type >::getNumNodesUptoRing ( int  iRing)
template<class Type >
int CHyperbolicTopology< Type >::getNumOutbounds ( int  iNode,
int  iK = 0 
)
inlinevirtual

Reimplemented from CSomTopology< Type >.

template<class Type >
int CHyperbolicTopology< Type >::getNumPolyLines ( )
inlinevirtual

Returns number of polylines which are use to draw structure information related to the topology

Reimplemented from CSomTopology< Type >.

template<class Type >
void CHyperbolicTopology< Type >::getOutBoundRange ( int  iNode,
vector< int >::iterator &  itStart,
vector< int >::iterator &  itEnd 
)
inline
template<class Type >
int CHyperbolicTopology< Type >::getOutBounds ( int  iNode)
inline
template<class Type >
bool CHyperbolicTopology< Type >::getPolyLine ( int  iLine,
int &  riStart,
int &  riEnd 
)
virtual

Returns true if requested polyline iLine is closed.

Reimplemented from CSomTopology< Type >.

template<class Type >
void CHyperbolicTopology< Type >::makeLattice ( )

Computes the coordinates of the lattice structure on Poincare Disk.

template<class Type >
void CHyperbolicTopology< Type >::performBeamSearch ( int  iRoot,
int  iLevel 
)
template<class Type >
void CHyperbolicTopology< Type >::rotateNode ( int  iCenter,
int  iFrom,
int  iTarget 
)

Rotates node around given center node determinded by angle of equilateral triangles of tesselation.

Parameters
iCenterNumber of center node
iFromNumber of origin node
iTargetNumber of target node
template<class Type >
void CHyperbolicTopology< Type >::setBeamBranching ( int  iBranch)
inline
template<class Type >
void CHyperbolicTopology< Type >::setNumVisibleRings ( int  iNumVisibleRings)
template<class Type >
void CHyperbolicTopology< Type >::setParameter ( float *  pfParam)
virtual

Sets parameters.

Reimplemented from CSomTopology< Type >.

template<class Type >
void CHyperbolicTopology< Type >::train ( CDataset< Type > &  rtTrainSet,
CSOM< Type > *  pSOM 
)
virtual

Use topology specific training algorithm to build SOM.

Reimplemented from CSomTopology< Type >.

template<class Type >
void CHyperbolicTopology< Type >::trainGrowing ( CDataset< Type > &  rtTrainSet,
CSOM< Type > *  pSOM,
float  fGrowParam 
)
virtual

Reimplemented from CSomTopology< Type >.

template<class Type >
int CHyperbolicTopology< Type >::translateGrid ( float *  pfTrans,
float *  pfTarget,
int  iMode = 0 
)
virtual

Translates grid structure.

Reimplemented from CSomTopology< Type >.

Friends And Related Function Documentation

template<class Type >
friend class CSOM< Type >
friend

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