#include <DSF.h>
Public Types | |
typedef std::pair< KEY, KEY > | KeyLabel |
typedef DSF< KEY > | Self |
typedef std::set< KEY > | Set |
typedef BTree< KEY, KEY > | Tree |
Public Member Functions | |
DSF () | |
DSF (const Tree &tree) | |
DSF (const std::list< KEY > &keys) | |
DSF (const std::set< KEY > &keys) | |
KEY | findSet (const KEY &key) const |
DSF | flatten () const |
Self | makeList (const std::list< KEY > &keys) const |
Self | makePair (const KEY &key1, const KEY &key2) const |
Self | makeSet (const KEY &key) const |
void | makeSetInPlace (const KEY &key) |
Self | makeUnion (const KEY &key1, const KEY &key2) const |
void | makeUnionInPlace (const KEY &key1, const KEY &key2) |
DSF | map (std::function< KEY(const KEY &)> func) const |
size_t | numSets () const |
bool | operator!= (const Self &t) const |
bool | operator== (const Self &t) const |
std::map< KEY, Set > | partition (const std::list< KEY > &keys) const |
void | print (const std::string &name="DSF") const |
Set | set (const KEY &label) const |
std::map< KEY, Set > | sets () const |
size_t | size () const |
Protected Member Functions | |
KEY | findSet_ (const KEY &key) |
Protected Member Functions inherited from gtsam::BTree< KEY, KEY > | |
BTree | add (const value_type &xd) const |
BTree | add (const KEY &x, const KEY &d) const |
const_iterator | begin () const |
BTree () | |
BTree (const BTree &other) | |
BTree (const value_type &keyValue) | |
BTree (const BTree &l, const value_type &keyValue, const BTree &r) | |
bool | empty () const |
const_iterator | end () const |
const KEY & | find (const KEY &k) const |
ACC | fold (std::function< ACC(const KEY &, const KEY &, const ACC &)> f, const ACC &a) const |
size_t | height () const |
void | iter (std::function< void(const KEY &, const KEY &)> f) const |
BTree< KEY, TO > | map (std::function< TO(const KEY &, const KEY &)> f) const |
bool | mem (const KEY &x) const |
const value_type & | min () const |
bool | operator!= (const BTree &other) const |
BTree & | operator= (const BTree &other) |
bool | operator== (const BTree &other) const |
void | print (const std::string &s="") const |
BTree | remove (const KEY &x) const |
BTree | remove_min () const |
bool | same (const BTree &other) const |
size_t | size () const |
Additional Inherited Members | |
Protected Types inherited from gtsam::BTree< KEY, KEY > | |
typedef const_iterator | iterator |
typedef std::pair< KEY, KEY > | value_type |
Static Protected Member Functions inherited from gtsam::BTree< KEY, KEY > | |
static BTree | merge (const BTree &t1, const BTree &t2) |
Disjoint Set Forest class
Quoting from CLR: A disjoint-set data structure maintains a collection S = {S_1,S_2,...} of disjoint dynamic sets. Each set is identified by a representative, which is some member of the set.
typedef std::pair<KEY, KEY> gtsam::DSF< KEY >::KeyLabel |
typedef DSF<KEY> gtsam::DSF< KEY >::Self |
typedef std::set<KEY> gtsam::DSF< KEY >::Set |
typedef BTree<KEY, KEY> gtsam::DSF< KEY >::Tree |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |