GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | List of all members
gtsam::FastSet< VALUE > Class Template Reference

#include <FastSet.h>

Inheritance diagram for gtsam::FastSet< VALUE >:
Inheritance graph
[legend]
Collaboration diagram for gtsam::FastSet< VALUE >:
Collaboration graph
[legend]

Public Types

typedef std::set< VALUE, std::less< VALUE >, typename internal::FastDefaultAllocator< VALUE >::type > Base
 

Public Member Functions

 FastSet ()=default
 Default constructor.
 
template<typename INPUTCONTAINER >
 FastSet (const INPUTCONTAINER &container)
 
 FastSet (const FastSet< VALUE > &x)
 
 FastSet (const Base &x)
 
 operator std::set< VALUE > () const
 
bool exists (const VALUE &e) const
 
void print (const std::string &str="") const
 
bool equals (const FastSet< VALUE > &other, double tol=1e-9) const
 
void merge (const FastSet &other)
 

Detailed Description

template<typename VALUE>
class gtsam::FastSet< VALUE >

FastSet is a thin wrapper around std::set 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 %.

Constructor & Destructor Documentation

◆ FastSet() [1/3]

template<typename VALUE>
template<typename INPUTCONTAINER >
gtsam::FastSet< VALUE >::FastSet ( const INPUTCONTAINER &  container)
inlineexplicit

Constructor from a iterable container, passes through to base class

◆ FastSet() [2/3]

template<typename VALUE>
gtsam::FastSet< VALUE >::FastSet ( const FastSet< VALUE > &  x)
inline

Copy constructor from another FastSet

◆ FastSet() [3/3]

template<typename VALUE>
gtsam::FastSet< VALUE >::FastSet ( const Base &  x)
inline

Copy constructor from the base set class

Member Function Documentation

◆ equals()

template<typename VALUE>
bool gtsam::FastSet< VALUE >::equals ( const FastSet< VALUE > &  other,
double  tol = 1e-9 
) const
inline

Check for equality within tolerance to implement Testable

◆ exists()

template<typename VALUE>
bool gtsam::FastSet< VALUE >::exists ( const VALUE &  e) const
inline

Handy 'exists' function

◆ merge()

template<typename VALUE>
void gtsam::FastSet< VALUE >::merge ( const FastSet< VALUE > &  other)
inline

insert another set: handy for MATLAB access

◆ operator std::set< VALUE >()

template<typename VALUE>
gtsam::FastSet< VALUE >::operator std::set< VALUE > ( ) const
inline

Conversion to a standard STL container

◆ print()

template<typename VALUE>
void gtsam::FastSet< VALUE >::print ( const std::string &  str = "") const
inline

Print to implement Testable: pretty basic


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