Go to the documentation of this file.
9 #ifndef mrpt_map_as_vector_H
10 #define mrpt_map_as_vector_H
56 template <
typename KEY,
typename VALUE,
106 return (i <
m_vec.size()) ? 1 : 0;
123 return m_vec[i].second;
131 this->
operator[](keyvalpair.first) = keyvalpair;
136 this->
operator[](keyvalpair.first) = keyvalpair;
144 if (i <
m_vec.size())
145 return m_vec.begin() + i;
154 if (i <
m_vec.size())
155 return m_vec.begin() + i;
void insert(const value_type &keyvalpair)
Insert pair<key,val>, as in std::map.
typename vec_t::iterator iterator
const Scalar * const_iterator
const_reverse_iterator rbegin() const
void insert(const iterator &guess_point, const value_type &keyvalpair)
Insert pair<key,val>, as in std::map (guess_point is actually ignored in this class)
const_iterator find(const size_t i) const
Constant-time find, returning an iterator to the <key,val> pair or to end() if not found (that is,...
size_type max_size() const
Maximum size due to system limits.
std::reverse_iterator< iterator > reverse_iterator
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const vec_t & getVector() const
Return a read-only reference to the internal vector.
const_iterator begin() const
iterator find(const size_t i)
Constant-time find, returning an iterator to the <key,val> pair or to end() if not found (that is,...
reverse_iterator rbegin()
std::vector< T, mrpt::aligned_allocator_cpp11< T > > aligned_std_vector
map_as_vector()
< Default constructor - does nothing */
void clear()
Clear the contents of this container.
map_as_vector(const map_as_vector< KEY, VALUE > &o)
Copy constructor.
const_reverse_iterator rend() const
void swap(map_as_vector< KEY, VALUE > &o)
Efficient swap with another object.
const_iterator end() const
vec_t m_vec
The actual container.
typename mrpt::aligned_std_vector< std::pair< KEY, VALUE >> vec_t
typename vec_t::const_iterator const_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
std::pair< KEY, VALUE > value_type
A STL-like container which looks and behaves (almost exactly) like a std::map<> but is implemented as...
typename vec_t::size_type size_type
VALUE & operator[](const size_t i)
Write/read via [i] operator, that creates all elements up to (and including) the i'th if they didn't ...
size_type count(const key_type i) const
Count how many entries have a given key value - unlike std::map<K,V>, recall that this class will say...
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 | |