Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History
Public Member Functions | |
node_map () | |
node_map (const graph &g, T t=T()) |
A node_map
is a specialized and optimized map implementation with nodes as keys. Using a node_map
is the standard way to attach user defined information to the nodes of a graph
.
An example of usage:
graph g;
node v1 = g.new_node(); node v2 = g.new_node();
node_map<string> label(g, "Default Label");
label[v1] = "v1"; label[v2] = "v2";
assert(label[v1] != label[v2]);
The nodes used as keys for a node_map
MUST be nodes of the same graph. If you want to use nodes from different graphs, use a map<node,T>
instead. A graph and a copy of it are considered to be different.
Most of the functionality of node_map
is inherited from ne_map.
University of Passau - FMI - Theoretical Computer Science