Graph Maps
The same group on the Doxygen site.
- group Graph Maps
Special graph-related maps.
This group contains maps that are specifically designed to assign values to the nodes and arcs/edges of graphs.
If you are looking for the standard graph maps (
NodeMap,ArcMap,EdgeMap), see the Graph Structure Concepts.
Classes
Class |
Description |
|---|---|
Provides an immutable and unique id for each item in a graph. |
|
General cross reference graph map type. |
|
Provides continuous and unique id for the items of a graph. |
|
Dynamic iterable bool map. |
|
Dynamic iterable integer map. |
|
Dynamic iterable map for comparable values. |
|
Map of the source nodes of arcs in a digraph. |
|
Map of the target nodes of arcs in a digraph. |
|
Map of the “forward” directed arc view of edges in a graph. |
|
Map of the “backward” directed arc view of edges in a graph. |
|
Map of the in-degrees of nodes in a digraph. |
|
Map of the out-degrees of nodes in a digraph. |
|
Potential difference map. |
Functions and other members
-
template< typename GR , typename From , typename To >
void mapCopy(
) Copy the values of a graph map to another map.
This function copies the values of a graph map to another graph map.
To::Keymust be equal or convertible toFrom::KeyandFrom::Valuemust be equal or convertible toTo::Value.For example, an edge map of
intvalue type can be copied to an arc map ofdoublevalue type in an undirected graph, but an arc map cannot be copied to an edge map. Note that even a ConstMap can be copied to a standard graph map, but mapFill() can also be used for this purpose.
-
template< typename GR , typename Map1 , typename Map2 >
bool mapCompare(
) Compare two graph maps.
This function compares the values of two graph maps. It returns
trueif the maps assign the same value for all items in the graph. TheKeytype of the maps (Node,ArcorEdge) must be equal and theirValuetypes must be comparable usingoperator==().- Parameters:
gr – The graph for which the maps are defined.
map1 – The first map.
map2 – The second map.
-
template< typename GR , typename Map >
Map::Key mapMin( const GR & gr , const Map & map ) Return an item having minimum value of a graph map.
This function returns an item (
Node,ArcorEdge) having minimum value of the given graph map. If the item set is empty, it returnsINVALID.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
-
template< typename GR , typename Map , typename Comp >
Map::Key mapMin(
) Return an item having minimum value of a graph map.
This function returns an item (
Node,ArcorEdge) having minimum value of the given graph map. If the item set is empty, it returnsINVALID.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
comp – Comparison function object.
-
template< typename GR , typename Map >
Map::Key mapMax( const GR & gr , const Map & map ) Return an item having maximum value of a graph map.
This function returns an item (
Node,ArcorEdge) having maximum value of the given graph map. If the item set is empty, it returnsINVALID.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
-
template< typename GR , typename Map , typename Comp >
Map::Key mapMax(
) Return an item having maximum value of a graph map.
This function returns an item (
Node,ArcorEdge) having maximum value of the given graph map. If the item set is empty, it returnsINVALID.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
comp – Comparison function object.
-
template< typename GR , typename Map >
Map::Value mapMinValue( const GR & gr , const Map & map ) Return the minimum value of a graph map.
This function returns the minimum value of the given graph map. The corresponding item set of the graph must not be empty.
- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
-
template< typename GR , typename Map , typename Comp >
Map::Value mapMinValue(
) Return the minimum value of a graph map.
This function returns the minimum value of the given graph map. The corresponding item set of the graph must not be empty.
- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
comp – Comparison function object.
-
template< typename GR , typename Map >
Map::Value mapMaxValue( const GR & gr , const Map & map ) Return the maximum value of a graph map.
This function returns the maximum value of the given graph map. The corresponding item set of the graph must not be empty.
- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
-
template< typename GR , typename Map , typename Comp >
Map::Value mapMaxValue(
) Return the maximum value of a graph map.
This function returns the maximum value of the given graph map. The corresponding item set of the graph must not be empty.
- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
comp – Comparison function object.
-
template< typename GR , typename Map >
Map::Key mapFind(
) Return an item having a specified value in a graph map.
This function returns an item (
Node,ArcorEdge) having the specified assigned value in the given graph map. If no such item exists, it returnsINVALID.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
val – The value that have to be found.
-
template< typename GR , typename Map , typename Pred >
Map::Key mapFindIf(
) Return an item having value for which a certain predicate is true in a graph map.
This function returns an item (
Node,ArcorEdge) having such assigned value for which the specified predicate is true in the given graph map. If no such item exists, it returnsINVALID.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
pred – The predicate function object.
-
template< typename GR , typename Map >
int mapCount(
) Return the number of items having a specified value in a graph map.
This function returns the number of items (
Node,ArcorEdge) having the specified assigned value in the given graph map.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
val – The value that have to be counted.
-
template< typename GR , typename Map , typename Pred >
int mapCountIf(
) Return the number of items having values for which a certain predicate is true in a graph map.
This function returns the number of items (
Node,ArcorEdge) having such assigned values for which the specified predicate is true in the given graph map.- Parameters:
gr – The graph for which the map is defined.
map – The graph map.
pred – The predicate function object.
-
template< typename GR , typename Map >
void mapFill(
) Fill a graph map with a certain value.
This function sets the specified value for all items (
Node,ArcorEdge) in the given graph map.- Parameters:
gr – The graph for which the map is defined.
map – The graph map. It must conform to the WriteMap concept.
val – The value.