21#include <gtsam/dllexport.h>
24#include <boost/shared_ptr.hpp>
41 typedef std::vector<size_t>
V;
44 boost::shared_ptr<V> v_;
51 DSFBase(
const boost::shared_ptr<V>& v_in);
54 size_t find(
size_t key)
const;
57 void merge(
const size_t& i1,
const size_t& i2);
67 std::vector<size_t> keys_;
74 DSFVector(
const std::vector<size_t>& keys);
77 DSFVector(
const boost::shared_ptr<V>& v_in,
const std::vector<size_t>& keys);
85 std::set<size_t>
set(
const size_t& label)
const;
88 std::map<size_t, std::set<size_t> >
sets()
const;
91 std::map<size_t, std::vector<size_t> >
arrays()
const;
Included from all GTSAM files.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
size_t find(size_t key) const
Find the label of the set in which {key} lives.
Definition DSFVector.cpp:44
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.
Definition DSFVector.cpp:54
std::vector< size_t > V
Vector of ints.
Definition DSFVector.h:41
DSFBase(const size_t numNodes)
Constructor that allocates new memory, allows for keys 0...numNodes-1.
Definition DSFVector.cpp:28
std::set< size_t > set(const size_t &label) const
Get the nodes in the tree with the given label.
Definition DSFVector.cpp:93
bool isSingleton(const size_t &label) const
Find whether there is one and only one occurrence for the given {label}.
Definition DSFVector.cpp:79
std::map< size_t, std::set< size_t > > sets() const
Return all sets, i.e. a partition of all elements.
Definition DSFVector.cpp:102
std::map< size_t, std::vector< size_t > > arrays() const
Return all sets, i.e. a partition of all elements.
Definition DSFVector.cpp:110
DSFVector(const size_t numNodes)
Constructor that allocates new memory, uses sequential keys 0...numNodes-1.
Definition DSFVector.cpp:59