|
| DSF (const Tree &tree) |
|
| DSF (const std::list< KEY > &keys) |
|
| DSF (const std::set< KEY > &keys) |
|
Self | makeSet (const KEY &key) const |
|
void | makeSetInPlace (const KEY &key) |
|
KEY | findSet (const KEY &key) const |
|
Self | makeUnion (const KEY &key1, const KEY &key2) const |
|
void | makeUnionInPlace (const KEY &key1, const KEY &key2) |
|
Self | makePair (const KEY &key1, const KEY &key2) const |
|
Self | makeList (const std::list< KEY > &keys) const |
|
DSF | flatten () const |
|
DSF | map (boost::function< KEY(const KEY &)> func) const |
|
size_t | numSets () const |
|
size_t | size () const |
|
std::map< KEY, Set > | sets () const |
|
std::map< KEY, Set > | partition (const std::list< KEY > &keys) const |
|
Set | set (const KEY &label) const |
|
bool | operator== (const Self &t) const |
| equality
|
|
bool | operator!= (const Self &t) const |
| inequality
|
|
void | print (const std::string &name="DSF") const |
|
|
KEY | findSet_ (const KEY &key) |
| same as findSet except with path compression: After we have traversed the path to the root, each parent pointer is made to directly point to it
|
|
| BTree () |
| default constructor creates an empty tree
|
|
| BTree (const BTree &other) |
| copy constructor
|
|
| BTree (const value_type &keyValue) |
| create leaf from key-value pair
|
|
| BTree (const BTree &l, const value_type &keyValue, const BTree &r) |
| create from key-value pair and left, right subtrees
|
|
BTree & | operator= (const BTree &other) |
| assignment operator
|
|
bool | empty () const |
| Check whether tree is empty.
|
|
BTree | add (const value_type &xd) const |
| add a key-value pair
|
|
BTree | add (const KEY &x, const KEY &d) const |
| add a key-value pair
|
|
bool | mem (const KEY &x) const |
| member predicate
|
|
bool | same (const BTree &other) const |
| Check whether trees are exactly the same (occupy same memory)
|
|
bool | operator== (const BTree &other) const |
| Check whether trees are structurally the same, i.e., contain the same values in same tree-structure.
|
|
bool | operator!= (const BTree &other) const |
|
const value_type & | min () const |
| minimum key binding
|
|
BTree | remove_min () const |
| remove minimum key binding
|
|
BTree | remove (const KEY &x) const |
| remove a key-value pair
|
|
size_t | height () const |
| Return height of the tree, 0 if empty.
|
|
size_t | size () const |
| return size of the tree
|
|
const KEY & | find (const KEY &k) const |
| find a value given a key, throws exception when not found Optimized non-recursive version as [find] is crucial for speed
|
|
void | print (const std::string &s="") const |
| print in-order
|
|
void | iter (boost::function< void(const KEY &, const KEY &)> f) const |
| iterate over tree
|
|
BTree< KEY, TO > | map (boost::function< TO(const KEY &, const KEY &)> f) const |
| map key-values in tree over function f that computes a new value
|
|
ACC | fold (boost::function< ACC(const KEY &, const KEY &, const ACC &)> f, const ACC &a) const |
| t.fold(f,a) computes [(f kN dN ... More...
|
|
const_iterator | begin () const |
| return iterator
|
|
const_iterator | end () const |
| return iterator
|
|