4 #include <ext/hash_map>
14 template< typename CharT, typename Traits, typename Alloc >
15 struct hash< std::basic_string<CharT, Traits, Alloc> > {
16 size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
18 const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
20 return c.hash(s.c_str(), s.c_str() + s.size());
26 template< typename CharT, typename Traits, typename Alloc >
27 struct hash< const std::basic_string<CharT, Traits, Alloc> > { //yes you need this version aswell!
29 size_t operator()(const std::basic_string<CharT, Traits, Alloc>& s) const {
31 const std::collate<CharT>& c = std::use_facet< std::collate<CharT> >(std::locale());
33 return c.hash(s.c_str(), s.c_str() + s.size());
41 Planner(std::vector<Action> actions, literals init, literals goal);
45 void makePlan(Node* node);
48 __gnu_cxx::hash_map<std::string,Node*> _addedNodes;
49 __gnu_cxx::hash_map<std::string,Action> _actions;