Public Types | Public Member Functions | List of all members
gtsam::FastMap< KEY, VALUE > Class Template Reference

#include <FastMap.h>

Inheritance diagram for gtsam::FastMap< KEY, VALUE >:
Inheritance graph
[legend]

Public Types

typedef std::map< KEY, VALUE, std::less< KEY >, typename internal::FastDefaultAllocator< std::pair< const KEY, VALUE > >::typeBase
 

Public Member Functions

bool exists (const KEY &e) const
 
 FastMap ()
 
template<typename INPUTITERATOR >
 FastMap (INPUTITERATOR first, INPUTITERATOR last)
 
 FastMap (const FastMap< KEY, VALUE > &x)
 
 FastMap (const Base &x)
 
bool insert2 (const KEY &key, const VALUE &val)
 
 operator std::map< KEY, VALUE > () const
 

Detailed Description

template<typename KEY, typename VALUE>
class gtsam::FastMap< KEY, VALUE >

FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the default STL allocator. This is just a convenience to avoid having lengthy types in the code. Through timing, we've seen that the fast_pool_allocator can lead to speedups of several percent.

Definition at line 39 of file FastMap.h.

Member Typedef Documentation

◆ Base

template<typename KEY, typename VALUE>
typedef std::map<KEY, VALUE, std::less<KEY>, typename internal::FastDefaultAllocator<std::pair<const KEY, VALUE> >::type > gtsam::FastMap< KEY, VALUE >::Base

Definition at line 45 of file FastMap.h.

Constructor & Destructor Documentation

◆ FastMap() [1/4]

template<typename KEY, typename VALUE>
gtsam::FastMap< KEY, VALUE >::FastMap ( )
inline

Default constructor

Definition at line 48 of file FastMap.h.

◆ FastMap() [2/4]

template<typename KEY, typename VALUE>
template<typename INPUTITERATOR >
gtsam::FastMap< KEY, VALUE >::FastMap ( INPUTITERATOR  first,
INPUTITERATOR  last 
)
inlineexplicit

Constructor from a range, passes through to base class

Definition at line 52 of file FastMap.h.

◆ FastMap() [3/4]

template<typename KEY, typename VALUE>
gtsam::FastMap< KEY, VALUE >::FastMap ( const FastMap< KEY, VALUE > &  x)
inline

Copy constructor from another FastMap

Definition at line 55 of file FastMap.h.

◆ FastMap() [4/4]

template<typename KEY, typename VALUE>
gtsam::FastMap< KEY, VALUE >::FastMap ( const Base x)
inline

Copy constructor from the base map class

Definition at line 58 of file FastMap.h.

Member Function Documentation

◆ exists()

template<typename KEY, typename VALUE>
bool gtsam::FastMap< KEY, VALUE >::exists ( const KEY &  e) const
inline

Handy 'exists' function

Definition at line 69 of file FastMap.h.

◆ insert2()

template<typename KEY, typename VALUE>
bool gtsam::FastMap< KEY, VALUE >::insert2 ( const KEY &  key,
const VALUE &  val 
)
inline

Handy 'insert' function for Matlab wrapper

Definition at line 66 of file FastMap.h.

◆ operator std::map< KEY, VALUE >()

template<typename KEY, typename VALUE>
gtsam::FastMap< KEY, VALUE >::operator std::map< KEY, VALUE > ( ) const
inline

Conversion to a standard STL container

Definition at line 61 of file FastMap.h.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:18