GTSAM
4.0.2
C++ library for smoothing and mapping (SAM)
|
#include <DSFVector.h>
Public Types | |
typedef std::vector< size_t > | V |
Vector of ints. | |
Public Member Functions | |
DSFVector (const size_t numNodes) | |
Constructor that allocates new memory, uses sequential keys 0...numNodes-1. | |
DSFVector (const std::vector< size_t > &keys) | |
Constructor that allocates memory, uses given keys. | |
DSFVector (const std::shared_ptr< V > &v_in, const std::vector< size_t > &keys) | |
Constructor that uses existing vectors. | |
bool | isSingleton (const size_t &label) const |
Find whether there is one and only one occurrence for the given {label}. | |
std::set< size_t > | set (const size_t &label) const |
Get the nodes in the tree with the given label. | |
std::map< size_t, std::set< size_t > > | sets () const |
Return all sets, i.e. a partition of all elements. | |
std::map< size_t, std::vector< size_t > > | arrays () const |
Return all sets, i.e. a partition of all elements. | |
size_t | find (size_t key) const |
Find the label of the set in which {key} lives. | |
void | merge (const size_t &i1, const size_t &i2) |
Merge the sets containing i1 and i2. Does nothing if i1 and i2 are already in the same set. | |
DSFVector additionally keeps a vector of keys to support more expensive operations