gtsam 4.2.0
gtsam
|
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 %.
Public Member Functions | |
FastSet ()=default | |
Default constructor. | |
template<typename INPUTCONTAINER > | |
FastSet (const INPUTCONTAINER &container) | |
Constructor from a iterable container, passes through to base class. | |
FastSet (const FastSet< VALUE > &x) | |
Copy constructor from another FastSet. | |
FastSet (const Base &x) | |
Copy constructor from the base set class. | |
operator std::set< VALUE > () const | |
Conversion to a standard STL container. | |
bool | exists (const VALUE &e) const |
Handy 'exists' function. | |
void | print (const std::string &str="") const |
Print to implement Testable: pretty basic. | |
bool | equals (const FastSet< VALUE > &other, double tol=1e-9) const |
Check for equality within tolerance to implement Testable. | |
void | merge (const FastSet &other) |
insert another set: handy for MATLAB access | |
Public Types | |
typedef std::set< VALUE, std::less< VALUE >, typename internal::FastDefaultAllocator< VALUE >::type > | Base |
Friends | |
class | boost::serialization::access |
Serialization function. | |