Template Function ADS::backtrack

Function Documentation

template<class N, class C, class P, class L, class V>
bool ADS::backtrack(const N &node, C &&children, P &&prune, L &&leaf, V &&visit)

the backtracking from the node N: prune( N ) rejects N and its subtree, a leaf goes to visit( N ), which returns true to stop, children( N ) gives the children of a node that is not a leaf; true if stopped