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