Baseclass for node_map and edge_map More...
#include <GTL/ne_map.h>
Template Form:
template <class Key, class Value, class Alloc = allocator<Value> > ne_map
ne_map is the common implementation of node_map
and edge_map
and cannot be used directly.
[public]
Initializes the ne_map to hold information for the elements of graph g. def is the value associated with all elements.
def | default value |
g |
associated graph |
[public]
Read/write accessor function to the value associated with
key
.
Use this function to change the value of an element in the
ne_map
. Assume that ne
is a
ne_map<int>
. Then you can assign the value
5 to key
with:
ne[key] = 5;
If there is no entry in the ne_map
associated
with key
, one is created.
key | Key of the Entry to change |
key
. [public]
Read-only accessor function to the value associated with
key
.
Use this function to read the value of an element in the
ne_map
. Assume that ne
is a
ne_map<int>
. Then you can print the value
associated with key
with:
cout << ne[key];
key | Key of the Entry to look up |
key
. [protected]
Constructs an empty ne_map
not associated to any
graph
.
[protected]
Constructs a ne_map
associated to the
graph g
. The value associated to each key is set
to def
.
You may (but need not) call
ne_map::init(const graph &, T)
to associate it to
a graph
.
def | default value |
g |
associated graph |
Kdoc |