Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
Functions | |
template<typename T > | |
T | left (T x) |
template<typename T > | |
T | right (T x) |
template<typename T > | |
T | parent (T x) |
template<typename T > | |
bool | isLeftChild (T x) |
template<typename T > | |
bool | isRightChild (T x) |
template<typename T > | |
T | sibling (T x) |
template<typename T > | |
T | nextPowerOfTwo (T x) |
bool heap::isLeftChild | ( | T | x | ) | [inline] |
bool heap::isRightChild | ( | T | x | ) | [inline] |
T heap::left | ( | T | x | ) | [inline] |
x | node_position |
T heap::nextPowerOfTwo | ( | T | x | ) |
Find smallest power of two that is at least x. Example: 2->2, 3->4, 4->4, 5->8
overflow_error |
T heap::parent | ( | T | x | ) | [inline] |
x | node_position |
T heap::right | ( | T | x | ) | [inline] |
x | node_position |
T heap::sibling | ( | T | x | ) | [inline] |