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

#include <CSOM.h>

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

Public Member Functions

 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)
 
virtual void train (CDataset< Type > &rtTrainSet, CSOM< Type > *pSOM)
 Use topology specific training algorithm to build SOM. More...
 
virtual void trainGrowing (CDataset< Type > &rtTrainSet, CSOM< Type > *pSOM, float fGrowParam)
 
virtual void buildDomains ()
 
int getNeighbour (int iNode, int iPos)
 
int getCenterNode (bool bVisibleNodes)
 
int getType ()
 Returns type of topology. More...
 
void setType (int iNewType)
 
virtual void getInfo (vector< int > &viDims)
 
virtual int translateGrid (float *pfTrans, float *pfTarget, int iMode=0)
 Translates grid structure. More...
 
virtual void setParameter (float *pfParam)
 Sets parameters. More...
 
int getGeometrySize ()
 
int getGeometryPoint (int iPoint)
 
virtual int getNumPolyLines ()
 
virtual bool getPolyLine (int iLine, int &riStart, int &riEnd)
 
virtual int getNumOutbounds (int iNode, int iK=0)
 

Public Attributes

vector< bool > vbExpand
 each node possible carries an expand attribute More...
 

Protected Attributes

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...
 

Friends

class CSOM< Type >
 

Constructor & Destructor Documentation

template<class Type >
CSomTopology< Type >::CSomTopology ( int  iNumNodes)

Constructor - creates a new instance for given number of nodes

Parameters
iNumNodesnumber of nodes for new grid
template<class Type >
virtual CSomTopology< Type >::~CSomTopology ( )
virtual

Member Function Documentation

template<class Type >
void CSomTopology< Type >::addDomain ( int  iStart,
int  iEnd 
)
inline
template<class Type >
void CSomTopology< Type >::addLink ( int  iFrom,
int  iTo 
)

Adds link information between two nodes

Parameters
iFromOrigin node from which the link starts
iToTarget node
template<class Type >
virtual void CSomTopology< Type >::buildDomains ( )
inlinevirtual
template<class Type >
int CSomTopology< Type >::getCenterNode ( bool  bVisibleNodes)
inline
template<class Type >
const CVector<double>& CSomTopology< Type >::getCenterPosition ( )
inline
template<class Type >
int CSomTopology< Type >::getDomainEnd ( int  iDomain)
inline
template<class Type >
int CSomTopology< Type >::getDomainOfNode ( int  iNode)
inline
template<class Type >
int CSomTopology< Type >::getDomainSize ( int  iDomain)
inline
template<class Type >
int CSomTopology< Type >::getDomainStart ( int  iDomain)
inline
template<class Type >
int CSomTopology< Type >::getGeometryPoint ( int  iPoint)
inline
template<class Type >
int CSomTopology< Type >::getGeometrySize ( )
inline
template<class Type >
virtual void CSomTopology< Type >::getInfo ( vector< int > &  viDims)
inlinevirtual

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 in CCartesianTopology< Type >, and CHyperbolicTopology< Type >.

template<class Type >
int CSomTopology< Type >::getNeighbour ( int  iNode,
int  iPos 
)
inline

Returns node number of specific neighbour of node

Parameters
iNodeNumber of node
iPosspecifies which neighbour id to return
Returns
number of neighbour node
template<class Type >
const CVector<double>& CSomTopology< Type >::getNodePosition ( int  i)
inline

Returns node position

Parameters
iNumber of node
Returns
Vector describing position of the node on the lattice
template<class Type >
int CSomTopology< Type >::getNumDomains ( )
inline
template<class Type >
int CSomTopology< Type >::getNumNeighbours ( int  i)
inline

Returns number of neighbours for specific node

Parameters
iNumber of node
Returns
Number of neighbours
template<class Type >
virtual int CSomTopology< Type >::getNumOutbounds ( int  iNode,
int  iK = 0 
)
inlinevirtual
template<class Type >
virtual int CSomTopology< Type >::getNumPolyLines ( )
inlinevirtual

Reimplemented in CHyperbolicTopology< Type >.

template<class Type >
virtual bool CSomTopology< Type >::getPolyLine ( int  iLine,
int &  riStart,
int &  riEnd 
)
inlinevirtual

Reimplemented in CHyperbolicTopology< Type >.

template<class Type >
int CSomTopology< Type >::getType ( )
inline

Returns type of topology.

template<class Type >
void CSomTopology< Type >::setNodePosition ( int  i,
CVector< double > &  rtPos 
)
inline

Sets node position

Parameters
iNumber of node to set
rtPosVector describing position of the node on the lattice
template<class Type >
virtual void CSomTopology< Type >::setParameter ( float *  pfParam)
inlinevirtual

Sets parameters.

Reimplemented in CHyperbolicTopology< Type >.

template<class Type >
void CSomTopology< Type >::setType ( int  iNewType)
inline
template<class Type >
virtual void CSomTopology< Type >::train ( CDataset< Type > &  rtTrainSet,
CSOM< Type > *  pSOM 
)
inlinevirtual

Use topology specific training algorithm to build SOM.

Reimplemented in CCartesianTopology< Type >, and CHyperbolicTopology< Type >.

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

Reimplemented in CHyperbolicTopology< Type >.

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

Translates grid structure.

Reimplemented in CCartesianTopology< Type >, and CHyperbolicTopology< Type >.

Friends And Related Function Documentation

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

Member Data Documentation

template<class Type >
int CSomTopology< Type >::iCenterNode
protected
template<class Type >
int CSomTopology< Type >::iNumVisibleNodes
protected
template<class Type >
int CSomTopology< Type >::iOldCenterNode
protected
template<class Type >
int CSomTopology< Type >::iType
protected

type of lattice topology

template<class Type >
int CSomTopology< Type >::iVisibleNodesCenter
protected
template<class Type >
CDenseVector<double> CSomTopology< Type >::tCenter
protected

vector describing topology center

template<class Type >
CDataset<double> CSomTopology< Type >::tNodes
protected

dataset of node coordinates

template<class Type >
vector<bool> CSomTopology< Type >::vbExpand

each node possible carries an expand attribute

template<class Type >
vector< pair<int,int> > CSomTopology< Type >::vDomains
protected

SOM area might consist of several domains.

template<class Type >
vector<int> CSomTopology< Type >::viGeometry
protected

geometry data for VTK

template<class Type >
vector<int> CSomTopology< Type >::viVisibleNode
protected

list of currently visible nodes

template<class Type >
vector<int> CSomTopology< Type >::viVisiblePos
protected

each visible node points to its "real" node

template<class Type >
vector< vector<int> > CSomTopology< Type >::vvNeighbours
protected

each node has a list of neighbours


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