GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
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]
Collaboration diagram for gtsam::FastMap< KEY, VALUE >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 FastMap ()
 
template<typename INPUTITERATOR >
 FastMap (INPUTITERATOR first, INPUTITERATOR last)
 
 FastMap (const FastMap< KEY, VALUE > &x)
 
 FastMap (const Base &x)
 
 operator std::map< KEY, VALUE > () const
 
bool insert2 (const KEY &key, const VALUE &val)
 
bool exists (const KEY &e) 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.

Constructor & Destructor Documentation

◆ FastMap() [1/4]

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

Default constructor

◆ 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

◆ FastMap() [3/4]

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

Copy constructor from another FastMap

◆ FastMap() [4/4]

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

Copy constructor from the base map class

Member Function Documentation

◆ exists()

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

Handy 'exists' function

◆ 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

◆ 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


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