Binary tree.
More...
#include <BTree.h>
|
class | const_iterator |
| Const iterator Not trivial: iterator keeps a stack to indicate current path from root_. More...
|
|
|
typedef std::pair< KEY, VALUE > | value_type |
|
typedef const_iterator | iterator |
|
template<class KEY, class VALUE>
class gtsam::BTree< KEY, VALUE >
Binary tree.
◆ BTree() [1/4]
template<class KEY, class VALUE>
default constructor creates an empty tree
◆ BTree() [2/4]
template<class KEY, class VALUE>
◆ BTree() [3/4]
template<class KEY, class VALUE>
create leaf from key-value pair
◆ BTree() [4/4]
template<class KEY, class VALUE>
create from key-value pair and left, right subtrees
◆ add() [1/2]
template<class KEY, class VALUE>
◆ add() [2/2]
template<class KEY, class VALUE>
◆ begin()
template<class KEY, class VALUE>
◆ empty()
template<class KEY, class VALUE>
Check whether tree is empty
◆ end()
template<class KEY, class VALUE>
◆ find()
template<class KEY, class VALUE>
const VALUE& gtsam::BTree< KEY, VALUE >::find |
( |
const KEY & |
k | ) |
const |
|
inline |
find a value given a key, throws exception when not found Optimized non-recursive version as [find] is crucial for speed
◆ fold()
template<class KEY, class VALUE>
template<class ACC >
ACC gtsam::BTree< KEY, VALUE >::fold |
( |
std::function< ACC(const KEY &, const VALUE &, const ACC &)> |
f, |
|
|
const ACC & |
a |
|
) |
| const |
|
inline |
t.fold(f,a) computes [(f kN dN ... (f k1 d1 a)...)], where [k1 ... kN] are the keys of all bindings in [m], and [d1 ... dN] are the associated data. The associated values are passed to [f] in reverse sort order
◆ height()
template<class KEY, class VALUE>
Return height of the tree, 0 if empty
◆ iter()
template<class KEY, class VALUE>
void gtsam::BTree< KEY, VALUE >::iter |
( |
std::function< void(const KEY &, const VALUE &)> |
f | ) |
const |
|
inline |
◆ map()
template<class KEY, class VALUE>
template<class TO >
BTree<KEY, TO> gtsam::BTree< KEY, VALUE >::map |
( |
std::function< TO(const KEY &, const VALUE &)> |
f | ) |
const |
|
inline |
map key-values in tree over function f that computes a new value
◆ mem()
template<class KEY, class VALUE>
◆ merge()
template<class KEY, class VALUE>
◆ min()
template<class KEY, class VALUE>
◆ operator=()
template<class KEY, class VALUE>
◆ operator==()
template<class KEY, class VALUE>
bool gtsam::BTree< KEY, VALUE >::operator== |
( |
const BTree< KEY, VALUE > & |
other | ) |
const |
|
inline |
Check whether trees are structurally the same, i.e., contain the same values in same tree-structure.
◆ print()
template<class KEY, class VALUE>
void gtsam::BTree< KEY, VALUE >::print |
( |
const std::string & |
s = "" | ) |
const |
|
inline |
◆ remove()
template<class KEY, class VALUE>
◆ remove_min()
template<class KEY, class VALUE>
remove minimum key binding
◆ same()
template<class KEY, class VALUE>
Check whether trees are exactly the same (occupy same memory)
◆ size()
template<class KEY, class VALUE>
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/gtsam-jlblanco-docs/checkouts/latest/gtsam_unstable/base/BTree.h