SMIL
1.0.4
|
Non-oriented graph. More...
Non-oriented graph.
#include <DGraph.hpp>
Public Member Functions | |
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. More... | |
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. More... | |
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 More... | |
void | removeLowEdges (EdgeWeightType EdgeThreshold) |
removeHighEdges() - remove edges whose weight are lesser then some threshold More... | |
NodeListType & | getNodes () |
getNodes() - get the list of nodes More... | |
EdgeListType & | getEdges () |
getEdges() - Get a vector containing the graph edges More... | |
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. More... | |
|
inline |
Add an edge to the graph.
If checkIfExists is true:
|
inline |
Add an edge to the graph given two nodes src and targ and an optional weight.
If checkIfExists is true:
|
inline |
removeHighEdges() - remove edges whose weight are greater then some threshold
[in] | EdgeThreshold | : |
|
inline |
removeHighEdges() - remove edges whose weight are lesser then some threshold
[in] | EdgeThreshold | : |
|
inline |
getNodes() - get the list of nodes
|
inline |
getEdges() - Get a vector containing the graph edges
|
inline |
labelizeNodes() - Labelize the nodes.
Give a different label to each group of connected nodes.