Function
mapValue
Subscript operator [ ] of maps.
MapValue mapValue(map, key)
Include Headers
seqan/map.h
Parameters
map
A map.
Types: Map
key
A key.
Metafunctions: Key
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 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.
Return Values
If map is a set: The same as hasKey.
If map is a dictionary: The same as value.
Metafunctions: MapValue
Member of
See Also
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:36