Main MRPT website > C++ reference for MRPT 1.5.9
List of all members
mrpt::utils::map_traits_map_as_vector::map< KEY, VALUE, _LessPred, _Alloc > Struct Template Reference

Detailed Description

template<class KEY, class VALUE, class _LessPred = std::less<KEY>, class _Alloc = Eigen::aligned_allocator<std::pair<const KEY, VALUE> >>
struct mrpt::utils::map_traits_map_as_vector::map< KEY, VALUE, _LessPred, _Alloc >

Definition at line 34 of file traits_map.h.

#include <mrpt/utils/traits_map.h>

Inheritance diagram for mrpt::utils::map_traits_map_as_vector::map< KEY, VALUE, _LessPred, _Alloc >:
Inheritance graph

Public Member Functions

Constructors, read/write access and other operations
size_t size () const
 
bool empty () const
 
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 an element i<N-1 exists just due to an insertion of element at N. More...
 
size_type max_size () const
 Maximum size due to system limits. More...
 
const vec_tgetVector () const
 Return a read-only reference to the internal vector. More...
 
void clear ()
 Clear the contents of this container. More...
 
void swap (map_as_vector< KEY, VALUE > &o)
 Efficient swap with another object. More...
 
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 exist already. More...
 
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) More...
 
void insert (const value_type &keyvalpair)
 Insert pair<key,val>, as in std::map. More...
 
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, if it's above the maximum index in the vector) More...
 
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, if it's above the maximum index in the vector) More...
 

Iterators stuff and other types

typedef KEY key_type
 
typedef std::pair< KEY, VALUE > value_type
 
typedef typename mrpt::aligned_containers< std::pair< KEY, VALUE > >::vector_t vec_t
 
typedef vec_t::size_type size_type
 
typedef vec_t::iterator iterator
 
typedef vec_t::const_iterator const_iterator
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 

Member Typedef Documentation

◆ const_iterator

typedef vec_t::const_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::const_iterator
inherited

Definition at line 57 of file map_as_vector.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::const_reverse_iterator
inherited

Definition at line 59 of file map_as_vector.h.

◆ iterator

typedef vec_t::iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::iterator
inherited

Definition at line 56 of file map_as_vector.h.

◆ key_type

typedef KEY mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::key_type
inherited

Definition at line 52 of file map_as_vector.h.

◆ reverse_iterator

typedef std::reverse_iterator<iterator> mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::reverse_iterator
inherited

Definition at line 58 of file map_as_vector.h.

◆ size_type

typedef vec_t::size_type mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::size_type
inherited

Definition at line 55 of file map_as_vector.h.

◆ value_type

typedef std::pair<KEY,VALUE> mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::value_type
inherited

Definition at line 53 of file map_as_vector.h.

◆ vec_t

typedef typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::vec_t
inherited

Definition at line 54 of file map_as_vector.h.

Member Function Documentation

◆ begin() [1/2]

iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::begin ( )
inlineinherited

◆ begin() [2/2]

const_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::begin ( ) const
inlineinherited

◆ clear()

void mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::clear ( void  )
inlineinherited

Clear the contents of this container.

Definition at line 94 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.

◆ count()

size_type mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::count ( const key_type  i) const
inlineinherited

Count how many entries have a given key value - unlike std::map<K,V>, recall that this class will say an element i<N-1 exists just due to an insertion of element at N.

Definition at line 85 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.

◆ empty()

bool mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::empty ( ) const
inlineinherited

◆ end() [1/2]

iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::end ( )
inlineinherited

◆ end() [2/2]

const_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::end ( ) const
inlineinherited

◆ find() [1/2]

iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::find ( const size_t  i)
inlineinherited

Constant-time find, returning an iterator to the <key,val> pair or to end() if not found (that is, if it's above the maximum index in the vector)

Definition at line 112 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.

◆ find() [2/2]

const_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::find ( const size_t  i) const
inlineinherited

Constant-time find, returning an iterator to the <key,val> pair or to end() if not found (that is, if it's above the maximum index in the vector)

Definition at line 114 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.

◆ getVector()

const vec_t& mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::getVector ( ) const
inlineinherited

Return a read-only reference to the internal vector.

Definition at line 91 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.

◆ insert() [1/2]

void mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::insert ( const iterator guess_point,
const value_type keyvalpair 
)
inlineinherited

Insert pair<key,val>, as in std::map (guess_point is actually ignored in this class)

Definition at line 107 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::operator[]().

◆ insert() [2/2]

void mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::insert ( const value_type keyvalpair)
inlineinherited

Insert pair<key,val>, as in std::map.

Definition at line 109 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::operator[]().

◆ max_size()

size_type mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::max_size ( ) const
inlineinherited

Maximum size due to system limits.

Definition at line 88 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.

◆ operator[]()

VALUE& mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::operator[] ( const size_t  i)
inlineinherited

Write/read via [i] operator, that creates all elements up to (and including) the i'th if they didn't exist already.

Definition at line 100 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.

◆ rbegin() [1/2]

reverse_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::rbegin ( )
inlineinherited

◆ rbegin() [2/2]

const_reverse_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::rbegin ( ) const
inlineinherited

◆ rend() [1/2]

reverse_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::rend ( )
inlineinherited

◆ rend() [2/2]

const_reverse_iterator mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::rend ( ) const
inlineinherited

◆ size()

size_t mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::size ( ) const
inlineinherited

◆ swap()

void mrpt::utils::map_as_vector< KEY, VALUE, typename mrpt::aligned_containers<std::pair<KEY,VALUE> >::vector_t >::swap ( map_as_vector< KEY, VALUE > &  o)
inlineinherited

Efficient swap with another object.

Definition at line 97 of file map_as_vector.h.

References mrpt::utils::map_as_vector< KEY, VALUE, VECTOR_T >::m_vec.




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020