LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::weightedGraph< P, D, W >::node Class Reference

the elements of the graph are instances of this class More...

#include <ltiWeightedGraph.h>

List of all members.

Public Member Functions

 node ()
 node (const node &other)
 node (const P &position, const D &value, const int nb)
 ~node ()
nodecopy (const node &other)
void setData (const D &value)
D & getData ()
const D & getData () const
void setPoint (const P &pos)
P & getPoint ()
const P & getPoint () const
int getId () const
void connect (const int id)
void disconnect (const int id)
void disconnect ()
const std::list< int > & getConnections () const
void setConnections (std::list< int > &con)

Protected Attributes

point
data
std::list< int > connections
int id

Detailed Description

template<class P, class D = int, class W = double>
class lti::weightedGraph< P, D, W >::node

the elements of the graph are instances of this class


Constructor & Destructor Documentation

template<class P, class D = int, class W = double>
lti::weightedGraph< P, D, W >::node::node (  )  [inline]

standard constructor

References lti::weightedGraph< P, D, W >::node::data.

template<class P, class D = int, class W = double>
lti::weightedGraph< P, D, W >::node::node ( const node other  )  [inline]

copy constructor

References lti::weightedGraph< P, D, W >::node::copy().

template<class P, class D = int, class W = double>
lti::weightedGraph< P, D, W >::node::node ( const P &  position,
const D &  value,
const int  nb 
) [inline]
template<class P, class D = int, class W = double>
lti::weightedGraph< P, D, W >::node::~node (  )  [inline]

destructor


Member Function Documentation

template<class P, class D = int, class W = double>
void lti::weightedGraph< P, D, W >::node::connect ( const int  id  )  [inline]

connects this node with an other node with the given id

References lti::weightedGraph< P, D, W >::node::connections.

template<class P, class D = int, class W = double>
node& lti::weightedGraph< P, D, W >::node::copy ( const node other  )  [inline]
template<class P, class D = int, class W = double>
void lti::weightedGraph< P, D, W >::node::disconnect (  )  [inline]

disconnects this node from all other nodes.

References lti::weightedGraph< P, D, W >::node::connections.

template<class P, class D = int, class W = double>
void lti::weightedGraph< P, D, W >::node::disconnect ( const int  id  )  [inline]

disconnects this node with an other node with the given id

References lti::weightedGraph< P, D, W >::node::connections.

template<class P, class D = int, class W = double>
const std::list<int>& lti::weightedGraph< P, D, W >::node::getConnections (  )  const [inline]

returns a list with the ids of all with this connected nodes.

References lti::weightedGraph< P, D, W >::node::connections.

template<class P, class D = int, class W = double>
const D& lti::weightedGraph< P, D, W >::node::getData (  )  const [inline]

returns the data, saved in the node

References lti::weightedGraph< P, D, W >::node::data.

template<class P, class D = int, class W = double>
D& lti::weightedGraph< P, D, W >::node::getData (  )  [inline]

returns the data, saved in the node

References lti::weightedGraph< P, D, W >::node::data.

Referenced by lti::weightedGraph< P, D, W >::node::copy().

template<class P, class D = int, class W = double>
int lti::weightedGraph< P, D, W >::node::getId (  )  const [inline]
template<class P, class D = int, class W = double>
const P& lti::weightedGraph< P, D, W >::node::getPoint (  )  const [inline]

returns the data, saved in the node

template<class P, class D = int, class W = double>
P& lti::weightedGraph< P, D, W >::node::getPoint (  )  [inline]

returns the data, saved in the node

Referenced by lti::weightedGraph< P, D, W >::node::copy().

template<class P, class D = int, class W = double>
void lti::weightedGraph< P, D, W >::node::setConnections ( std::list< int > &  con  )  [inline]

Sets the list with the ids of nodes this node is connected to.

References lti::weightedGraph< P, D, W >::node::connections.

template<class P, class D = int, class W = double>
void lti::weightedGraph< P, D, W >::node::setData ( const D &  value  )  [inline]

sets the data that the node contains

References lti::weightedGraph< P, D, W >::node::data.

template<class P, class D = int, class W = double>
void lti::weightedGraph< P, D, W >::node::setPoint ( const P &  pos  )  [inline]

sets the position of the node


Member Data Documentation

template<class P, class D = int, class W = double>
std::list<int> lti::weightedGraph< P, D, W >::node::connections [protected]
template<class P, class D = int, class W = double>
D lti::weightedGraph< P, D, W >::node::data [protected]
template<class P, class D = int, class W = double>
int lti::weightedGraph< P, D, W >::node::id [protected]

the id of this node

Referenced by lti::weightedGraph< P, D, W >::node::getId().

template<class P, class D = int, class W = double>
P lti::weightedGraph< P, D, W >::node::point [protected]

the data that the node contains


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

Generated on Sat Apr 10 15:28:52 2010 for LTI-Lib by Doxygen 1.6.1