![]() |
Analysis Software
Documentation for sPHENIX simulation software
|
A specialized map with edges as keys. More...
#include <JETSCAPE/blob/main/external_packages/gtl/include/GTL/edge_map.h>
Inheritance diagram for edge_map< T, Alloc >:
Collaboration diagram for edge_map< T, Alloc >:Public Member Functions | |
| edge_map () | |
| edge_map (const graph &g, T t=T()) | |
Public Member Functions inherited from ne_map< edge, T, graph, Alloc > | |
| void | init (const graph &, Tdef=T()) |
| value_reference | operator[] (edgekey) |
| const_value_reference | operator[] (edgekey) const |
| void | clear () |
Additional Inherited Members | |
Public Types inherited from ne_map< edge, T, graph, Alloc > | |
| typedef vector< T, Alloc > ::reference | value_reference |
| typedef vector< T, Alloc > ::const_reference | const_value_reference |
Protected Member Functions inherited from ne_map< edge, T, graph, Alloc > | |
| ne_map () | |
| ne_map (const graph &g, Tdef=T()) | |
A specialized map with edges as keys.
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.
Definition at line 54 of file edge_map.h.
View newest version in sPHENIX GitHub at line 54 of file edge_map.h
Constructs an empty edge_map not associated with any graph. You may (but need not) call ne_map::init(const graph &, T) to associate it to a graph.
Definition at line 64 of file edge_map.h.
View newest version in sPHENIX GitHub at line 64 of file edge_map.h
|
inlineexplicit |
Constructs a edge_map associated to the graph g. The value associated to each edge in g is set to t.
Definition at line 72 of file edge_map.h.
View newest version in sPHENIX GitHub at line 72 of file edge_map.h