This group contains the map structures implemented in LEMON.
LEMON provides several special purpose maps and map adaptors that e.g. combine new maps from existing ones.
See also: Map Concepts.
|
file | maps.h |
| Miscellaneous property maps.
|
|
|
template<typename K , typename V > |
NullMap< K, V > | nullMap () |
| Returns a NullMap class.
|
|
template<typename K , typename V > |
ConstMap< K, V > | constMap (const V &v) |
| Returns a ConstMap class.
|
|
template<typename K , typename V , V v> |
ConstMap< K, Const< V, v > > | constMap () |
| Returns a ConstMap class with inlined constant value.
|
|
template<typename T > |
IdentityMap< T > | identityMap () |
| Returns an IdentityMap class.
|
|
template<typename V > |
RangeMap< V > | rangeMap (int size=0, const V &value=V()) |
| Returns a RangeMap class.
|
|
template<typename V > |
RangeMap< V > | rangeMap (const std::vector< V > &vector) |
| Returns a RangeMap class created from an appropriate std::vector .
|
|
template<typename K , typename V , typename Compare > |
SparseMap< K, V, Compare > | sparseMap (const V &value=V()) |
| Returns a SparseMap class.
|
|
template<typename K , typename V , typename Compare > |
SparseMap< K, V, Compare > | sparseMap (const std::map< K, V, Compare > &map, const V &value=V()) |
| Returns a SparseMap class created from an appropriate std::map .
|
|
template<typename K > |
TrueMap< K > | trueMap () |
| Returns a TrueMap class.
|
|
template<typename K > |
FalseMap< K > | falseMap () |
| Returns a FalseMap class.
|
|
template<typename Iterator > |
LoggerBoolMap< Iterator > | loggerBoolMap (Iterator it) |
| Returns a LoggerBoolMap class.
|
|
◆ nullMap()
template<typename K , typename V >
This function just returns a NullMap
class.
◆ constMap() [1/2]
template<typename K , typename V >
ConstMap< K, V > constMap |
( |
const V & |
v | ) |
|
|
related |
This function just returns a ConstMap
class.
◆ constMap() [2/2]
template<typename K , typename V , V v>
ConstMap< K, Const< V, v > > constMap |
( |
| ) |
|
|
related |
This function just returns a ConstMap
class with inlined constant value.
◆ identityMap()
◆ rangeMap() [1/2]
template<typename V >
RangeMap< V > rangeMap |
( |
int |
size = 0 , |
|
|
const V & |
value = V() |
|
) |
| |
|
related |
This function just returns a RangeMap
class.
◆ rangeMap() [2/2]
template<typename V >
RangeMap< V > rangeMap |
( |
const std::vector< V > & |
vector | ) |
|
|
related |
This function just returns a RangeMap
class created from an appropriate std::vector
.
◆ sparseMap() [1/2]
template<typename K , typename V , typename Compare >
SparseMap< K, V, Compare > sparseMap |
( |
const V & |
value = V() | ) |
|
|
related |
This function just returns a SparseMap
class with specified default value.
◆ sparseMap() [2/2]
template<typename K , typename V , typename Compare >
SparseMap< K, V, Compare > sparseMap |
( |
const std::map< K, V, Compare > & |
map, |
|
|
const V & |
value = V() |
|
) |
| |
|
related |
This function just returns a SparseMap
class created from an appropriate std::map
.
◆ trueMap()
This function just returns a TrueMap
class.
◆ falseMap()
This function just returns a FalseMap
class.
◆ loggerBoolMap()
This function just returns a LoggerBoolMap
class.
The most important usage of it is storing certain nodes or arcs that were marked true
by an algorithm. For example, it makes easier to store the nodes in the processing order of Dfs algorithm, as the following examples show.
std::vector<Node> v;
LoggerBoolMap< Iterator > loggerBoolMap(Iterator it)
Returns a LoggerBoolMap class.
Definition maps.h:1808
DfsWizard< DfsWizardBase< GR > > dfs(const GR &digraph)
Function-type interface for DFS algorithm.
Definition dfs.h:1121
int countNodes(const Graph &g)
Function to count the nodes in the graph.
Definition core.h:252
- Note
- The container of the iterator must contain enough space for the elements or the iterator should be an inserter iterator.
-
LoggerBoolMap is just writable, so it cannot be used when a readable map is needed, for example, as
ReachedMap
for Bfs
, Dfs
and Dijkstra
algorithms.