Template Function ADS::localMinimum(BinaryTree<T> *, C)
Defined in File LocalOptima.h
Function Documentation
-
template<class T, class C = std::less<>>
BinaryTree<T> *ADS::localMinimum(BinaryTree<T> *t, C less = C()) localMinimum(): a node of the tree t not larger than its children and, if it is not t, smaller than its parent: from t down to the first child smaller than the current node, the left one first; O( h ) comparisons
- Pre:
t is not nil
- Post:
no child of r smaller than r, and r smaller than its parent if r is not t