Function
mapValue
Subscript operator [ ] of maps.
MapValue mapValue(map, key)
Parameters
map
A map.
Types: Map
key
A key.
Metafunctions: Key
Return Values
If map is a set: The same as hasKey(map, key).
If map is a dictionary: The same as value(map, key).
Metafunctions: Metafunction.MapValue
Remarks
Usually, value implements the subscript operator [ ], but for maps, this operator is implemented in mapValue. The semantic of this operator depends on the kind of map: If the map has a cargo, than mapValue(map, key) returns the cargo of the (first) value in the map of the given key. If the map has no cargo, than the function returns a true, if key is in map, or false otherwise.
You may overload Function.key and cargo for your own value type in order to define, what part of your value type is used as key and what as cargo.
Note: There is no way to create a set of Pair, since it is always interpreted as a key/value pair. If you need a key type that holds two members, define your own key type.
See Also
SeqAn - Sequence Analysis Library - www.seqan.de