Node Maps
The data type node_map<E> can be used to associate additional
(LEDA or user
defined) information of type E with the nodes of a graph.
Example of how to use
a node map for a graph
Strengths
- works well for dynamic graphs
- efficient: initializiation in constant time and access in expected
constant time
- there can be an arbitrary number of Node Maps for a graph
- Node Maps can be defined at any point in a program
- can be passed (by reference) to a function with Node
Array as formal parameter.
Disadvantages
Tips
- Use Node Maps in situations where a sparse map on the nodes has to
be maintained.
- If more than half of the entries are actually used it is often better
to use a Node Array.
|
See also:
Parameterized Graphs
Node Arrays
Node Data Slots
Two Dimensional Node Maps
Associate Information with
Graphs
Graphs and Related Data Types
Maps
Manual Entries:
Manual
Page Node Maps
User
Defined Parameter Types
|