Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Generic algorithms for external use


Functions

template<class _IterativeWalker, class _Function> _Function walk (_IterativeWalker __first, _IterativeWalker __last, _Function __f)
template<class _PrePostWalker, class _Function> _Function pre_post_walk (_PrePostWalker __first, _PrePostWalker __last, _Function __f)
template<class _PrePostWalker, class _Function1, class _Function2> _Function2 pre_post_walk (_PrePostWalker __first, _PrePostWalker __last, _Function1 __f1, _Function2 __f2)
template<class _PrePostWalker, class _Function> _Function var_walk (_PrePostWalker __first, _PrePostWalker __last, _Function __f)
template<class _PrePostWalker, class _Function1, class _Function2> _Function2 var_walk (_PrePostWalker __first, _PrePostWalker __last, _Function1 __f1, _Function2 __f2)
template<class _PrePostWalker, class _Function, class _Predicate> _Function walk_if (_PrePostWalker __first, _PrePostWalker __last, _Function __f, _Predicate __pred)
template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate> _Function2 walk_if (_PrePostWalker __first, _PrePostWalker __last, _Function1 __f1, _Function2 __f2, _Predicate __pred)
template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate1, class _Predicate2> _Function2 walk_if (_PrePostWalker __first, _PrePostWalker __last, _Function1 __f1, _Function2 __f2, _Predicate1 __pred1, _Predicate2 __pred2)
template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate> _Function2 cached_walk_if (_PrePostWalker __first, _PrePostWalker __last, _Function1 __f1, _Function2 __f2, _Predicate __pred)
template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate> _Function2 multi_walk_if (_PrePostWalker __first, _PrePostWalker __last, _Function1 __f1, _Function2 __f2, _Predicate __pred)
template<class _Walker, class _Function> _Function walk_up (_Walker __w, _Function __f)
template<class _Walker, class _Function> _Function var_walk_up (_Walker __w, _Function __f)
template<class _Walker, class _Function, class _Predicate> _Function walk_up_if (_Walker __w, _Function __f, _Predicate __p)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_preorder_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_postorder_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_preorder_walk_if (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_preorder_walk_if (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_postorder_walk_if (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_walk_if (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_cached_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_multi_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor, class _Predicate1, class _Predicate2> _Visitor::return_value recursive_walk_if (_Walker __w, _Visitor __f, _Predicate1 __p1, _Predicate2 __p2)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_cached_walk (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_multi_walk (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_preorder_walk_up (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_preorder_walk_up_if (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_preorder_walk_up_if (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_postorder_walk_up (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_postorder_walk_up_if (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_walk_up (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_walk_up_if (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor, class _Predicate1, class _Predicate2> _Visitor::return_value recursive_walk_up_if (_Walker __w, _Visitor __f, _Predicate1 __p1, _Predicate2 __p2)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_cached_walk_up (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_multi_walk_up (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_cached_walk_up (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor, class _Predicate> _Visitor::return_value recursive_multi_walk_up (_Walker __w, _Visitor __f, _Predicate __p)
template<class _Walker, class _Visitor> _Visitor::return_value general_directed_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value general_directed_walk_down (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value general_directed_walk_up (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_general_directed_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_general_directed_walk_down (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_general_directed_walk_up (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value general_walk (_Walker __w, _Visitor __f)
template<class _Walker, class _Visitor> _Visitor::return_value recursive_general_walk (_Walker __w, _Visitor __f)
template<class _BidirIter, class _Tp> _BidirIter rfind (_BidirIter __first, _BidirIter __last, const _Tp &__val)
template<class _BidirIter, class _Predicate> _BidirIter rfind_if (_BidirIter __first, _BidirIter __last, _Predicate __pred)

Detailed Description

The generic functions in this section are for external use.

Function Documentation

template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate>
_Function2 cached_walk_if _PrePostWalker    __first,
_PrePostWalker    __last,
_Function1    __f1,
_Function2    __f2,
_Predicate    __pred
 

this tree walk is a pre+post walk, calling two functions at every node, one in the preorder and the other in the postorder visit. If the function returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 393 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value general_directed_walk _Walker    __w,
_Visitor    __f
 

perform a general directed walk starting at __w. At every node various methods of the visitor __f are called:

  • analyze is called before walking for every virtual node. While this function returns true, the walk goes on.
  • preorder is called before a walk direction is being decided.
  • postorder is called after the walk dircetion has been found.
  • walk_up shall return whether the next step of the walk is upwards or downwards.
  • up is called for an upwards step and decides which in-edge to take.
  • down is called for a downwards step and decides which out-edge to take.
  • value is called to compute the return value for this node.

Definition at line 2389 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value general_directed_walk_down _Walker    __w,
_Visitor    __f
 

perform a general directed walk starting at __w. At every node various methods of the visitor __f are called:

  • analyze is called before walking for every virtual node. While this function returns true, the walk goes on.
  • preorder is called before a walk direction is being decided.
  • postorder is called after the walk dircetion has been found.
  • down is called to decide which out-edge to take.
  • value is called to compute the return value for this node.

Definition at line 2418 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value general_directed_walk_up _Walker    __w,
_Visitor    __f
 

perform a general directed walk starting at __w. At every node various methods of the visitor __f are called:

  • analyze is called before walking for every virtual node. While this function returns true, the walk goes on.
  • preorder is called before a walk direction is being decided.
  • postorder is called after the walk dircetion has been found.
  • up is called to decide which in-edge to take.
  • value is called to compute the return value for this node.

Definition at line 2445 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value general_walk _Walker    __w,
_Visitor    __f
 

perform a general walk starting at __w. At every node various methods of the visitor __f are called:

  • analyze is called before walking for every virtual node. While this function returns true, the walk goes on.
  • preorder is called before a walk direction is being decided.
  • postorder is called after the walk dircetion has been found.
  • next is called to decide which edge to follow.
  • value is called to compute the return value for this node.

Definition at line 2557 of file vgtl_algo.h.

template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate>
_Function2 multi_walk_if _PrePostWalker    __first,
_PrePostWalker    __last,
_Function1    __f1,
_Function2    __f2,
_Predicate    __pred
 

this tree walk is a pre+post walk, calling two functions at every node, one in the preorder and the other in the postorder visit. If the function returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 426 of file vgtl_algo.h.

template<class _PrePostWalker, class _Function1, class _Function2>
_Function2 pre_post_walk _PrePostWalker    __first,
_PrePostWalker    __last,
_Function1    __f1,
_Function2    __f2
 

make a pre and post order tree walk, calling two different functions, one in the preorder step, the other in the postorder step.

Definition at line 223 of file vgtl_algo.h.

template<class _PrePostWalker, class _Function>
_Function pre_post_walk _PrePostWalker    __first,
_PrePostWalker    __last,
_Function    __f
 

make a pre and post order tree walk, calling a function for every node.

Definition at line 205 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_cached_walk _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive pre+post order walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If then predicate __p returns true, the children are visited. If it returns false, the children are ignored
  • collect is called everytime a child has finished
  • postorder is called after the children have been visited.
  • value is called to compute the return value for this node

Definition at line 1296 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_cached_walk _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If it returns true, the children are visited. If it returns false, the children are ignored
  • collect is called everytime a child has finished
  • postorder is called after the children have been visited.
  • value is called to compute the return value for this node

Definition at line 1047 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_cached_walk_up _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive pre+post order walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If then predicate __p returns true, the children are visited. If it returns false, the children are ignored
  • collect is called everytime a child has finished
  • postorder is called after the children have been visited.
  • value is called to compute the return value for this node

Definition at line 2223 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_cached_walk_up _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If it returns true, the children are visited. If it returns false, the children are ignored
  • collect is called everytime a child has finished
  • postorder is called after the children have been visited.
  • value is called to compute the return value for this node

Definition at line 2065 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_general_directed_walk _Walker    __w,
_Visitor    __f
 

perform a recursive general directed walk starting at __w. At every node various methods of the visitor __f are called:

  • preorder is called before any child is visited
  • analyze is called everytime before a child node might be vistied. While this function returns true, the walk goes on at this node.
  • collect is called everytime a child has finished.
  • postorder is called after the walk dircetion has been found.
  • walk_up shall return whether the next step of the walk is upwards or downwards.
  • up is called for an upwards step and decides which in-edge to take.
  • down is called for a downwards step and decides which out-edge to take.
  • value is called to compute the return value for this node.

Definition at line 2478 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_general_directed_walk_down _Walker    __w,
_Visitor    __f
 

perform a recursive general directed walk starting at __w. At every node various methods of the visitor __f are called:

  • preorder is called before any child is visited
  • analyze is called everytime before a child node might be vistied. While this function returns true, the walk goes on at this node.
  • collect is called everytime a child has finished.
  • postorder is called after the walk dircetion has been found.
  • down is called to decide which out-edge to take.
  • value is called to compute the return value for this node.

Definition at line 2508 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_general_directed_walk_up _Walker    __w,
_Visitor    __f
 

perform a recursive general directed walk starting at __w. At every node various methods of the visitor __f are called:

  • preorder is called before any child is visited
  • analyze is called everytime before a child node might be vistied. While this function returns true, the walk goes on at this node.
  • collect is called everytime a child has finished.
  • postorder is called after the walk dircetion has been found.
  • up is called to decide which in-edge to take.
  • value is called to compute the return value for this node.

Definition at line 2533 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_general_walk _Walker    __w,
_Visitor    __f
 

perform a recursive general walk starting at __w. At every node various methods of the visitor __f are called:

  • preorder is called before any child is visited
  • analyze is called everytime before a child node might be vistied. While this function returns true, the walk goes on at this node.
  • collect is called everytime a child has finished.
  • postorder is called after the walk dircetion has been found.
  • next is called to decide which edge to follow.
  • value is called to compute the return value for this node.

Definition at line 2584 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_multi_walk _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive pre+post order walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node.
  • vcollect is called after a child of a virtual node has finished.
  • vvalue is called to compute the return value of a virtual node.
  • preorder is called before the children are visited.
  • collect is called everytime a child has finished.
  • postorder is called after the children have been visited. If the predicate __p returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node.

Definition at line 1375 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_multi_walk _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node.
  • vcollect is called after a child of a virtual node has finished.
  • vvalue is called to compute the return value of a virtual node.
  • preorder is called before the children are visited.
  • collect is called everytime a child has finished.
  • postorder is called after the children have been visited. If it returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node.

Definition at line 1123 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_multi_walk_up _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive pre+post order walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node.
  • vcollect is called after a child of a virtual node has finished.
  • vvalue is called to compute the return value of a virtual node.
  • preorder is called before the children are visited.
  • collect is called everytime a child has finished.
  • postorder is called after the children have been visited. If the predicate __p returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node.

Definition at line 2302 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_multi_walk_up _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node.
  • vcollect is called after a child of a virtual node has finished.
  • vvalue is called to compute the return value of a virtual node.
  • preorder is called before the children are visited.
  • collect is called everytime a child has finished.
  • postorder is called after the children have been visited. If it returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node.

Definition at line 2142 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_postorder_walk _Walker    __w,
_Visitor    __f
 

perform a recursive postorder walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • init is called before the children are visited
  • collect is called everytime a child has finished
  • postorder is called after all children have finished
  • value is called to compute the return value for this node

Definition at line 595 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_postorder_walk_if _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive postorder walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • init is called before the children are visited. Then the predicate is called. If this predicate returns true, the children are visited. Otherwise, the node is treated as if it was a terminal node.
  • postorder is called after all children have been visited.
  • collect is called everytime a child has finished.
  • value is called to compute the return value for this node.

Definition at line 880 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_postorder_walk_up _Walker    __w,
_Visitor    __f
 

perform a recursive postorder walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • init is called before the children are visited
  • collect is called everytime a child has finished
  • postorder is called after all children have finished
  • value is called to compute the return value for this node

Definition at line 1668 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_postorder_walk_up_if _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive postorder walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • init is called before the children are visited. Then the predicate is called. If this predicate returns true, the children are visited. Otherwise, the node is treated as if it was a terminal node.
  • postorder is called after all children have been visited.
  • collect is called everytime a child has finished.
  • value is called to compute the return value for this node.

Definition at line 1739 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_preorder_walk _Walker    __w,
_Visitor    __f
 

perform a recursive preorder walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited
  • collect is called everytime a child has finished
  • value is called to compute the return value for this node

Definition at line 530 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_preorder_walk_if _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive preorder walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. Then the predicate is called. If this predicate returns true, the children are visited. Otherwise, the node is treated as if it was a terminal node.
  • collect is called everytime a child has finished
  • value is called to compute the return value for this node

Definition at line 803 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_preorder_walk_if _Walker    __w,
_Visitor    __f
 

perform a recursive preorder walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If this function returns true, the children are visited. Otherwise, the node is treated as if it was a terminal node.
  • collect is called everytime a child has finished
  • value is called to compute the return value for this node

Definition at line 730 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_preorder_walk_up _Walker    __w,
_Visitor    __f
 

perform a recursive preorder walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited
  • collect is called everytime a child has finished
  • value is called to compute the return value for this node

Definition at line 1455 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate>
_Visitor::return_value recursive_preorder_walk_up_if _Walker    __w,
_Visitor    __f,
_Predicate    __p
 

perform a recursive preorder walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. Then the predicate is called. If this predicate returns true, the children are visited. Otherwise, the node is treated as if it was a terminal node.
  • collect is called everytime a child has finished
  • value is called to compute the return value for this node

Definition at line 1594 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_preorder_walk_up_if _Walker    __w,
_Visitor    __f
 

perform a recursive preorder walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If this function returns true, the children are visited. Otherwise, the node is treated as if it was a terminal node.
  • collect is called everytime a child has finished
  • value is called to compute the return value for this node

Definition at line 1521 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_walk _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited
  • collect is called everytime a child has finished
  • postorder is called after all children have been visited
  • value is called to compute the return value for this node

Definition at line 663 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate1, class _Predicate2>
_Visitor::return_value recursive_walk_if _Walker    __w,
_Visitor    __f,
_Predicate1    __p1,
_Predicate2    __p2
 

perform a recursive pre+post order walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If then predicate p1 returns true, the children are visited. If it returns false, the children are ignored
  • collect is called everytime a child has finished
  • postorder is called after the children have been visited. If then predicate p2 returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node

Definition at line 1205 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_walk_if _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node.
  • vcollect is called after a child of a virtual node has finished.
  • vvalue is called to compute the return value of a virtual node.
  • preorder is called before the children are visited. If it returns true, the children are visited. If it returns false, the children are ignored.
  • collect is called everytime a child has finished.
  • postorder is called after the children have been visited. If it returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node.

Definition at line 962 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_walk_up _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited
  • collect is called everytime a child has finished
  • postorder is called after all children have been visited
  • value is called to compute the return value for this node

Definition at line 1815 of file vgtl_algo.h.

template<class _Walker, class _Visitor, class _Predicate1, class _Predicate2>
_Visitor::return_value recursive_walk_up_if _Walker    __w,
_Visitor    __f,
_Predicate1    __p1,
_Predicate2    __p2
 

perform a recursive pre+post order walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node
  • vcollect is called after a child of a virtual node has finished
  • vvalue is called to compute the return value of a virtual node
  • preorder is called before the children are visited. If then predicate p1 returns true, the children are visited. If it returns false, the children are ignored
  • collect is called everytime a child has finished
  • postorder is called after the children have been visited. If then predicate p2 returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node

Definition at line 1974 of file vgtl_algo.h.

template<class _Walker, class _Visitor>
_Visitor::return_value recursive_walk_up_if _Walker    __w,
_Visitor    __f
 

perform a recursive pre+post order walk towards the root starting at __w. At every node various methods of the visitor __f are called:

  • vinit is called before walking for every virtual node.
  • vcollect is called after a child of a virtual node has finished.
  • vvalue is called to compute the return value of a virtual node.
  • preorder is called before the children are visited. If it returns true, the children are visited. If it returns false, the children are ignored.
  • collect is called everytime a child has finished.
  • postorder is called after the children have been visited. If it returns true, the walk is continued by switching back to preorder mode for this node. If it returns false, the walk is over for this node.
  • value is called to compute the return value for this node.

Definition at line 1886 of file vgtl_algo.h.

template<class _BidirIter, class _Tp>
_BidirIter rfind _BidirIter    __first,
_BidirIter    __last,
const _Tp &    __val
[inline]
 

Find the last occurrence of a value in a sequence.

Parameters:
__first  An input iterator.
__last  An input iterator.
__val  The value to find.
Returns:
The last iterator i in the range [__first,__last) such that *i == val, or __last if no such iterator exists.

Definition at line 191 of file vgtl_helpers.h.

template<class _BidirIter, class _Predicate>
_BidirIter rfind_if _BidirIter    __first,
_BidirIter    __last,
_Predicate    __pred
[inline]
 

Find the last element in a sequence for which a predicate is true.

Parameters:
__first  An input iterator.
__last  An input iterator.
__pred  A predicate.
Returns:
The last iterator i in the range [__first,__last) such that __pred(*i) is true, or __last if no such iterator exists.

Definition at line 207 of file vgtl_helpers.h.

template<class _PrePostWalker, class _Function1, class _Function2>
_Function2 var_walk _PrePostWalker    __first,
_PrePostWalker    __last,
_Function1    __f1,
_Function2    __f2
 

this tree walk is a pre+post walk, calling two functions at every node, one in the preorder and the other in the postorder step. If the function returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 270 of file vgtl_algo.h.

template<class _PrePostWalker, class _Function>
_Function var_walk _PrePostWalker    __first,
_PrePostWalker    __last,
_Function    __f
 

this tree walk is a pre+post walk, calling a function at every node. If the function returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 247 of file vgtl_algo.h.

template<class _Walker, class _Function>
_Function var_walk_up _Walker    __w,
_Function    __f
 

this tree walk is a pre+post walk towards the root, calling a function at every node. If the function returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 475 of file vgtl_algo.h.

template<class _IterativeWalker, class _Function>
_Function walk _IterativeWalker    __first,
_IterativeWalker    __last,
_Function    __f
 

make a pre or post order tree walk, calling a function for every node it is also possible to perform a pre+post order walk. In that case the function _f must distinguish between the two calls by itself.

Definition at line 190 of file vgtl_algo.h.

template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate1, class _Predicate2>
_Function2 walk_if _PrePostWalker    __first,
_PrePostWalker    __last,
_Function1    __f1,
_Function2    __f2,
_Predicate1    __pred1,
_Predicate2    __pred2
 

this tree walk is a pre+post walk, calling two functions at every node, one in the preorder and the other in the postorder visit. If the predicates return true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks. Predicate pred1 is called in the preorder phase, predicate pred2 in the postorder phase.

Definition at line 355 of file vgtl_algo.h.

template<class _PrePostWalker, class _Function1, class _Function2, class _Predicate>
_Function2 walk_if _PrePostWalker    __first,
_PrePostWalker    __last,
_Function1    __f1,
_Function2    __f2,
_Predicate    __pred
 

this tree walk is a pre+post walk, calling two functions at every node, one in the preorder and the other in the postorder visit. If the predicate returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 322 of file vgtl_algo.h.

template<class _PrePostWalker, class _Function, class _Predicate>
_Function walk_if _PrePostWalker    __first,
_PrePostWalker    __last,
_Function    __f,
_Predicate    __pred
 

this tree walk is a pre+post walk, calling a function at every node. If the predicate returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 295 of file vgtl_algo.h.

template<class _Walker, class _Function>
_Function walk_up _Walker    __w,
_Function    __f
 

make a pre or post order tree walk towards the root node, calling a function for every node it is also possible to perform a pre+post order walk. In that case the function _f must distinguish between the two calls by itself.

Definition at line 455 of file vgtl_algo.h.

template<class _Walker, class _Function, class _Predicate>
_Function walk_up_if _Walker    __w,
_Function    __f,
_Predicate    __p
 

this tree walk is a pre+post walk towards the root, calling a function at every node. If the predicate returns true, the status of the walker is flipped from pre to post (or vice versa). If the status is changed from pre to post, the subtree originating from the current position is not visited, if the status change is the other way round, it is revisited. This allows for cached or partially multi pass walks.

Definition at line 496 of file vgtl_algo.h.


Generated on Tue Nov 4 01:41:51 2003 for Vienna Graph Template Library by doxygen1.2.18