#include <DSFVector.h>
Public Member Functions | |
std::map< size_t, std::vector< size_t > > | arrays () const |
Return all sets, i.e. a partition of all elements. More... | |
DSFVector (const size_t numNodes) | |
Constructor that allocates new memory, uses sequential keys 0...numNodes-1. More... | |
DSFVector (const std::shared_ptr< V > &v_in, const std::vector< size_t > &keys) | |
Constructor that uses existing vectors. More... | |
DSFVector (const std::vector< size_t > &keys) | |
Constructor that allocates memory, uses given keys. More... | |
bool | isSingleton (const size_t &label) const |
Find whether there is one and only one occurrence for the given {label}. More... | |
std::set< size_t > | set (const size_t &label) const |
Get the nodes in the tree with the given label. More... | |
std::map< size_t, std::set< size_t > > | sets () const |
Return all sets, i.e. a partition of all elements. More... | |
Public Member Functions inherited from gtsam::DSFBase | |
DSFBase (const size_t numNodes) | |
Constructor that allocates new memory, allows for keys 0...numNodes-1. More... | |
DSFBase (const std::shared_ptr< V > &v_in) | |
Constructor that uses an existing, pre-allocated vector. More... | |
size_t | find (size_t key) const |
Find the label of the set in which {key} lives. More... | |
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. More... | |
Private Attributes | |
std::vector< size_t > | keys_ |
stores keys to support more expensive operations More... | |
Additional Inherited Members | |
Public Types inherited from gtsam::DSFBase | |
typedef std::vector< size_t > | V |
Vector of ints. More... | |
DSFVector additionally keeps a vector of keys to support more expensive operations
Definition at line 64 of file DSFVector.h.
gtsam::DSFVector::DSFVector | ( | const size_t | numNodes | ) |
Constructor that allocates new memory, uses sequential keys 0...numNodes-1.
Definition at line 59 of file DSFVector.cpp.
gtsam::DSFVector::DSFVector | ( | const std::vector< size_t > & | keys | ) |
Constructor that allocates memory, uses given keys.
Definition at line 67 of file DSFVector.cpp.
gtsam::DSFVector::DSFVector | ( | const std::shared_ptr< V > & | v_in, |
const std::vector< size_t > & | keys | ||
) |
Constructor that uses existing vectors.
Definition at line 72 of file DSFVector.cpp.
Return all sets, i.e. a partition of all elements.
Definition at line 110 of file DSFVector.cpp.
bool gtsam::DSFVector::isSingleton | ( | const size_t & | label | ) | const |
Find whether there is one and only one occurrence for the given {label}.
Definition at line 79 of file DSFVector.cpp.
Get the nodes in the tree with the given label.
Definition at line 93 of file DSFVector.cpp.
Return all sets, i.e. a partition of all elements.
Definition at line 102 of file DSFVector.cpp.
|
private |
stores keys to support more expensive operations
Definition at line 67 of file DSFVector.h.