|
| SimpleGraph (bool directed=false) |
|
SimpleGraph * | clone (void) |
|
bool | isDirected () |
| isDirected More...
|
|
NodeInterface * | addNode (NodeInterface *n) |
| addNode More...
|
|
NodeInterface * | addNode (Node *n) |
|
virtual void | connectNodes (NodeInterface *n1, NodeInterface *n2, cost_t c) |
| connectNodes connect 2 nodes. More...
|
|
void | updateCost (NodeInterface *n1, NodeInterface *n2, cost_t newcost, cost_t oldcost, bool onlySpecifiedCost=true) |
| update the cost of an edge specified by its pre and post node, eventually its cost More...
|
|
void | updateCost (NodeInterface *n1, NodeInterface *n2, cost_t newcost) |
|
void | updateCost (EdgeInterface *edge, cost_t cost) |
|
NodeInterface * | at (unsigned int i) |
| at returns the node at given index More...
|
|
EdgeInterface * | edgeAt (unsigned int i) |
|
std::vector< NodeInterface * > | sonsNodes (NodeInterface *i) |
|
std::vector< EdgeInterface * > | sons (NodeInterface *i) |
|
std::vector< NodeInterface * > | getNodes (void) |
|
unsigned int | size (void) |
| size the number of nodes More...
|
|
unsigned int | edgesNumber (void) |
|
void | clear (void) |
|
|
std::vector< Edge * > | _edges |
|
std::vector< Node * > | _nodes |
|
bool | _is_directed |
|
unsigned int | _count |
|
|
std::ostream & | operator<< (std::ostream &os, SimpleGraph &g) |
|
at returns the node at given index
- Parameters
-
- Returns
- reference to node at i
Implements mho::GraphInterface.
connectNodes connect 2 nodes.
- Parameters
-
n1 | first node |
n2 | second node |
c | cost if directed graph, makes an arrow n1 -> n2 otherwise n1 <-> n2 |
Implements mho::GraphInterface.
bool mho::SimpleGraph::isDirected |
( |
| ) |
|
|
virtual |
unsigned int mho::SimpleGraph::size |
( |
void |
| ) |
|
|
virtual |
void mho::SimpleGraph::updateCost |
( |
NodeInterface * |
n1, |
|
|
NodeInterface * |
n2, |
|
|
cost_t |
newcost, |
|
|
cost_t |
oldcost, |
|
|
bool |
onlySpecifiedCost = true |
|
) |
| |
update the cost of an edge specified by its pre and post node, eventually its cost
- Parameters
-
n1 | pre node |
n2 | post node (may be swapped in undirected graphs) |
newcost | cost to assign |
oldcost | current cost of the edge |
onlySpecifiedCost | ignore oldcost if false and change cost of all edges from n1 to n2 |
The documentation for this class was generated from the following files:
- src/utils/multiHandOver/SimpleGraph.h
- src/utils/multiHandOver/SimpleGraph.cpp