1 #ifndef FAIF_SEARCHING_NODE_HPP 2 #define FAIF_SEARCHING_NODE_HPP 4 #if defined(_MSC_VER) && (_MSC_VER >= 1400) 6 #pragma warning(disable:4510) 7 #pragma warning(disable:4610) 14 #include <boost/bind.hpp> 15 #include <boost/smart_ptr.hpp> 16 #include <boost/concept_check.hpp> 26 template<
typename Indiv
idual>
struct Node {
27 typedef boost::shared_ptr<Individual> PNode;
28 typedef std::vector<PNode> Path;
29 typedef std::vector<PNode> Children;
33 template<
typename Node>
34 inline std::ostream& operator<<(std::ostream& os, const std::vector<boost::shared_ptr<Node> >& path) {
35 std::transform( path.begin(), path.end(), std::ostream_iterator<Node>(os,
" "),
36 boost::bind(&boost::shared_ptr<Node>::operator*, _1) );
43 template<
typename Node>
45 typedef typename Node::PNode PNode;
46 typedef typename Node::Children Children;
50 Children ch = n.getChildren();
59 template<
typename Node>
63 bool fin = n.isFinal();
72 template<
typename Node>
84 template<
typename Node>
96 #endif //FAIF_SEARCHING_NODE_HPP
the concept for heuristic search algorithms, it check the presence of 'getHeuristic' method...
Definition: Node.hpp:85
the concept for node with children
Definition: Node.hpp:44
the struct to create node in search space from individual
Definition: Node.hpp:26
the concept for node with final flag for search in tree-like structures The function 'searchDepthFirs...
Definition: Node.hpp:60
the concept for informed search algorithms, it check the presence of 'getWeight' method, used by informed search functions e.g. 'searchUniformCost'
Definition: Node.hpp:73