Public Types | Public Member Functions | Private Member Functions | List of all members
gtsam::FastSet< VALUE > Class Template Reference

#include <FastSet.h>

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

Public Types

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

Public Member Functions

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

Private Member Functions

 GTSAM_CONCEPT_ASSERT (IsTestable< VALUE >)
 

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 %.

Definition at line 51 of file FastSet.h.

Member Typedef Documentation

◆ Base

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

Definition at line 59 of file FastSet.h.

Constructor & Destructor Documentation

◆ FastSet() [1/4]

template<typename VALUE >
gtsam::FastSet< VALUE >::FastSet ( )
default

Default constructor.

◆ FastSet() [2/4]

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

Constructor from a iterable container, passes through to base class

Definition at line 67 of file FastSet.h.

◆ FastSet() [3/4]

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

Copy constructor from another FastSet

Definition at line 72 of file FastSet.h.

◆ FastSet() [4/4]

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

Copy constructor from the base set class

Definition at line 77 of file FastSet.h.

Member Function Documentation

◆ Base() [1/2]

template<typename VALUE >
Base::Base
default

◆ Base() [2/2]

template<typename VALUE >
Base::Base
delete

◆ 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

Definition at line 109 of file FastSet.h.

◆ exists()

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

Handy 'exists' function

Definition at line 98 of file FastSet.h.

◆ GTSAM_CONCEPT_ASSERT()

template<typename VALUE >
gtsam::FastSet< VALUE >::GTSAM_CONCEPT_ASSERT ( IsTestable< VALUE >  )
private

◆ merge()

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

insert another set: handy for MATLAB access

Definition at line 121 of file FastSet.h.

◆ operator std::set< VALUE >()

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

Conversion to a standard STL container

Definition at line 93 of file FastSet.h.

◆ print()

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

Print to implement Testable: pretty basic

Definition at line 103 of file FastSet.h.


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


gtsam
Author(s):
autogenerated on Sat Jun 1 2024 03:14:04