Go to the documentation of this file.
31 template <
typename KEY,
typename VALUE>
83 bool direct(
const KEY& k, VALUE& out_v)
const
86 if (i ==
m_k2v.end())
return false;
93 inline bool hasKey(
const KEY& k)
const
124 if (i ==
m_v2k.end())
return false;
void clear()
Clear the contents of the bi-map.
bimap()
Default constructor - does nothing.
const Scalar * const_iterator
const_iterator end() const
const_iterator_inverse inverse_end() const
bool hasKey(const KEY &k) const
Return true if the given key 'k' is in the bi-map.
void insert(const KEY &k, const VALUE &v)
Insert a new pair KEY<->VALUE in the bi-map.
const_iterator_inverse find_value(const VALUE &v) const
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const_iterator_inverse inverse_begin() const
#define THROW_EXCEPTION(msg)
VALUE direct(const KEY &k) const
Get the value associated the given key, KEY->VALUE, raising an exception if not present.
iterator_inverse find_value(const VALUE &v)
bool hasValue(const VALUE &v) const
Return true if the given value 'v' is in the bi-map.
std::map< VALUE, KEY > m_v2k
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std...
bool inverse(const VALUE &v, KEY &out_k) const
Get the key associated the given value, VALUE->KEY, returning false if not present.
bool direct(const KEY &k, VALUE &out_v) const
Get the value associated the given key, KEY->VALUE, returning false if not present.
KEY inverse(const VALUE &v) const
Get the key associated the given value, VALUE->KEY, raising an exception if not present.
const_iterator find_key(const KEY &k) const
iterator_inverse inverse_end()
typename std::map< mrpt::maps::CLandmark::TLandmarkID, unsigned int >::const_iterator const_iterator
iterator find_key(const KEY &k)
iterator_inverse inverse_begin()
std::map< KEY, VALUE > m_k2v
const_iterator begin() const
typename std::map< unsigned int, mrpt::maps::CLandmark::TLandmarkID >::const_iterator const_iterator_inverse
typename std::map< mrpt::maps::CLandmark::TLandmarkID, unsigned int >::iterator iterator
const std::map< VALUE, KEY > & getInverseMap() const
Return a read-only reference to the internal map KEY->VALUES.
const std::map< KEY, VALUE > & getDirectMap() const
Return a read-only reference to the internal map KEY->VALUES.
typename std::map< unsigned int, mrpt::maps::CLandmark::TLandmarkID >::iterator iterator_inverse
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |