latest version v1.9 - last update 10 Apr 2010 |
the elements of the graph are instances of this class More...
#include <ltiWeightedGraph.h>
Public Member Functions | |
node () | |
node (const node &other) | |
node (const P &position, const D &value, const int nb) | |
~node () | |
node & | copy (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 | |
P | point |
D | data |
std::list< int > | connections |
int | id |
the elements of the graph are instances of this class
lti::weightedGraph< P, D, W >::node::node | ( | ) | [inline] |
standard constructor
References lti::weightedGraph< P, D, W >::node::data.
lti::weightedGraph< P, D, W >::node::node | ( | const node & | other | ) | [inline] |
copy constructor
References lti::weightedGraph< P, D, W >::node::copy().
lti::weightedGraph< P, D, W >::node::node | ( | const P & | position, | |
const D & | value, | |||
const int | nb | |||
) | [inline] |
constructor
References lti::weightedGraph< P, D, W >::node::data.
lti::weightedGraph< P, D, W >::node::~node | ( | ) | [inline] |
destructor
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.
node& lti::weightedGraph< P, D, W >::node::copy | ( | const node & | other | ) | [inline] |
copy the contents of other into this object
References lti::weightedGraph< P, D, W >::node::data, lti::weightedGraph< P, D, W >::node::getData(), lti::weightedGraph< P, D, W >::node::getId(), and lti::weightedGraph< P, D, W >::node::getPoint().
Referenced by lti::weightedGraph< P, D, W >::node::node().
void lti::weightedGraph< P, D, W >::node::disconnect | ( | ) | [inline] |
disconnects this node from all other nodes.
References lti::weightedGraph< P, D, W >::node::connections.
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.
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.
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.
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().
int lti::weightedGraph< P, D, W >::node::getId | ( | ) | const [inline] |
returns the id of this node
References lti::weightedGraph< P, D, W >::node::id.
Referenced by lti::weightedGraph< P, D, W >::node::copy().
const P& lti::weightedGraph< P, D, W >::node::getPoint | ( | ) | const [inline] |
returns the data, saved in the node
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().
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.
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.
void lti::weightedGraph< P, D, W >::node::setPoint | ( | const P & | pos | ) | [inline] |
sets the position of the node
std::list<int> lti::weightedGraph< P, D, W >::node::connections [protected] |
list with the ids, of all connected nodes
Referenced by lti::weightedGraph< P, D, W >::node::connect(), lti::weightedGraph< P, D, W >::node::disconnect(), lti::weightedGraph< P, D, W >::node::getConnections(), and lti::weightedGraph< P, D, W >::node::setConnections().
D lti::weightedGraph< P, D, W >::node::data [protected] |
the data that the node contains
Referenced by lti::weightedGraph< P, D, W >::node::copy(), lti::weightedGraph< P, D, W >::node::getData(), lti::weightedGraph< P, D, W >::node::node(), and lti::weightedGraph< P, D, W >::node::setData().
int lti::weightedGraph< P, D, W >::node::id [protected] |
the id of this node
Referenced by lti::weightedGraph< P, D, W >::node::getId().
P lti::weightedGraph< P, D, W >::node::point [protected] |
the data that the node contains