template<class NodeT = size_t, class WeightT = size_t>
class smil::Graph< NodeT, WeightT >
Non-oriented graph.
- See also
- Edge
|
| Graph () |
| Default constructor.
|
|
| Graph (const Graph &rhs) |
| Copy constructor.
|
|
void | clear () |
| Clear graph content.
|
|
void | addNode (const NodeT &ind) |
| Add a node given its index.
|
|
void | addNode (const NodeT &ind, const WeightT &val) |
| Add a node given its index and its optional value.
|
|
int | findEdge (const EdgeType &e) |
| findEdge() - Find an edge by its content - return its index
|
|
int | findEdge (const NodeT &src, const NodeT &targ) |
| findEdge() - Find an edge by its nodes - return its index
|
|
void | addEdge (const EdgeType &e, bool checkIfExists=true) |
| Add an edge to the graph.
|
|
void | addEdge (const NodeT src, const NodeT targ, WeightT weight=0, bool checkIfExists=true) |
| Add an edge to the graph given two nodes src and targ and an optional weight.
|
|
void | sortEdges (bool reverse=false) |
| Sort edges (by weight as defined by the operator < of class Edge)
|
|
GraphType | clone () |
| clone() -
|
|
size_t | getNodeNbr () |
| getNodeNbr() -
|
|
size_t | getEdgeNbr () |
| getEdgeNbr() -
|
|
void | removeNodeEdges (const NodeT node) |
| Remove all edges linked to the node nodeIndex.
|
|
void | removeEdge (const size_t index) |
| Remove an edge.
|
|
void | removeEdge (const NodeT src, const NodeT targ) |
| Find and remove an edge linking src to targ.
|
|
void | removeEdge (const EdgeType &edge) |
| Remove a given edge.
|
|
void | removeHighEdges (EdgeWeightType EdgeThreshold) |
| removeHighEdges() - remove edges whose weight are greater then some threshold
|
|
void | removeLowEdges (EdgeWeightType EdgeThreshold) |
| removeHighEdges() - remove edges whose weight are lesser then some threshold
|
|
NodeListType & | getNodes () |
| getNodes() - get the list of nodes
|
|
EdgeListType & | getEdges () |
| getEdges() - Get a vector containing the graph edges
|
|
NodeValuesType & | getNodeValues () |
| getNodeValues() -
|
|
NodeEdgeListType & | getNodeEdges () |
| getNodeEdges()-
|
|
NodeEdgesType | getNodeEdges (const size_t &node) |
| getNodeEdges() - Get a map containing the edges linked to a given node
|
|
GraphType | computeMST () |
| computeMST() - Compute the Minimum Spanning Tree graph
|
|
virtual void | printSelf (ostream &os=std::cout, string s="") const |
| printSelf() -
|
|
map< NodeT, NodeT > | labelizeNodes () const |
| labelizeNodes() - Labelize the nodes.
|
|