1 #ifndef FAIF_DEPTH_FIRST_SEARCH_HPP 2 #define FAIF_DEPTH_FIRST_SEARCH_HPP 7 #include <boost/concept_check.hpp> 9 #include "TreeNodeImpl.hpp" 31 std::stack< TreeNode<T>* > buffer;
32 std::stack< TreeNode<T>* > trash;
39 while (!buffer.empty()) {
47 while (curr->
getLevel() <= trash.top()->getLevel()) {
48 trash.top()->eraseChildren();
63 typename TreeNode<T>::Children ch = curr->
getChildren();
81 #endif //FAIF_DEPTH_FIRST_SEARCH_HPP
the concept for node with children
Definition: Node.hpp:44
boost::shared_ptr< T > getPoint() const
Definition: TreeNodeImpl.hpp:45
the struct to create node in search space from individual
Definition: Node.hpp:26
Node< T >::Path searchDepthFirst(boost::shared_ptr< T > start, int max=200)
The depth-first search algorithm (DFS)
Definition: DepthFirst.h:26
the template to create the node in tree-based search methods
Definition: TreeNodeImpl.hpp:17
the concept for node with final flag for search in tree-like structures The function 'searchDepthFirs...
Definition: Node.hpp:60
Children getChildren()
Definition: TreeNodeImpl.hpp:95
Node< T >::Path generatePathToRoot() const
Definition: TreeNodeImpl.hpp:135
short getLevel() const
Definition: TreeNodeImpl.hpp:61
bool checkNodeInPath(const TreeNode< T > &n)
Definition: TreeNodeImpl.hpp:82