
Hi, I am trying to use hash feature with the graph library. Here are the various details: Solaris: SunOS 5.7 Compiler: KAI 4.0 STL: Native Sun Hash: A hacked up version of SGI/STLPort I can get graph to work with vectors/lists. I can't get it to work with the hash_set or hash_map. I get a message from the "concept_checks.h" file in my hash which essentially tells me that the hash function is not defined. I am reproducing the message from the compiler at the bottom. I am trying to make all this work by using the adjacency_list.cpp file in the examples directory. Here is the change I have made to that file: typedef adjacency_list<hash_setS, listS, undirectedS, VertexProperty, EdgeProperty> Graph; // New typedef adjacency_list<vecS, listS, undirectedS, VertexProperty, EdgeProperty> Graph; // Old Can you please help? Has anyone used the has feature in the graph library. I had to edit the line number 166 in adjacency_list.hpp to replace hash_set with hash_map. Thanks -Sandeep The message: "/lsi/home/bhutani/hash/include/concept_checks.h", line 289: error: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type return __f(__arg); ^ detected during instantiation of "_Ret _STL_UNARY_FUNCTION_ERROR<_Func, _Ret, _Arg>::__unary_function_requirement_violation(_Func &, const _Arg &) [with _Func=std::hash<boost::detail::adj_list_gen<boost::adjacenc y_list<boost::hash_setS, boost::listS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>, boost::listS, boost::hash_setS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>::config::StoredEdge>, _Ret=size_t, _Arg=boost::detail::adj_list_gen<boost::adjacency_list<boos t::hash_setS, boost::listS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>, boost::listS, boost::hash_setS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>::config::StoredEdge]" at line 95 of "adjacency_list.cpp" 1 error detected in the compilation of "adjacency_list.cpp". KCC: Compilation failed. boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>, boost::listS, boost::hash_setS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>::config::StoredEdge]" at line 95 of "adjacency_list.cpp" 1 error detected in the compilation of "adjacency_list.cpp". KCC: Compilation failed.

I'm using MSVC 6.0, STLPort 4.5.3 and i use hash_setS for the edge list container. I've encountered a problem with remove_edge, allthough i don't now whats really going on there. Beside that, there are no problems yet. ----- Original Message ----- From: "Sandeep Bhutani" <bhutani@lsil.com> Newsgroups: gmane.comp.lib.boost.user Sent: Saturday, August 24, 2002 1:16 AM Subject: Using Hash with Graph
Hi, I am trying to use hash feature with the graph library. Here are the various details: Solaris: SunOS 5.7 Compiler: KAI 4.0 STL: Native Sun Hash: A hacked up version of SGI/STLPort
I can get graph to work with vectors/lists. I can't get it to work with the hash_set or hash_map. I get a message from the "concept_checks.h" file in my hash which essentially tells me that the hash function is not defined. I am reproducing the message from the compiler at the bottom. I am trying to make all this work by using the adjacency_list.cpp file in the examples directory. Here is the change I have made to that file: typedef adjacency_list<hash_setS, listS, undirectedS, VertexProperty, EdgeProperty> Graph; // New typedef adjacency_list<vecS, listS, undirectedS, VertexProperty, EdgeProperty> Graph; // Old
Can you please help? Has anyone used the has feature in the graph library. I had to edit the line number 166 in adjacency_list.hpp to replace hash_set with hash_map.
Thanks -Sandeep
The message:
"/lsi/home/bhutani/hash/include/concept_checks.h", line 289: error: call of an object of a class type without appropriate operator() or conversion functions to pointer-to-function type return __f(__arg); ^ detected during instantiation of "_Ret _STL_UNARY_FUNCTION_ERROR<_Func, _Ret, _Arg>::__unary_function_requirement_violation(_Func &, const _Arg &) [with
_Func=std::hash<boost::detail::adj_list_gen<boost::adjacenc y_list<boost::hash_setS, boost::listS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>, boost::listS, boost::hash_setS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>::config::StoredEdge>, _Ret=size_t,
_Arg=boost::detail::adj_list_gen<boost::adjacency_list<boos t::hash_setS, boost::listS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>, boost::listS, boost::hash_setS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>::config::StoredEdge]" at line 95 of "adjacency_list.cpp"
1 error detected in the compilation of "adjacency_list.cpp". KCC: Compilation failed. boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>, boost::listS, boost::hash_setS, boost::undirectedS, boost::property<boost::vertex_index_t, size_t, boost::property<boost::vertex_color_t, boost::default_color_type, boost::no_property>>, boost::property<boost::edge_name_t, std::string, boost::no_property>, boost::no_property, boost::listS>::config::StoredEdge]" at line 95 of "adjacency_list.cpp"
1 error detected in the compilation of "adjacency_list.cpp". KCC: Compilation failed.

Hi Sandeep, It looks like there were some missing specializations of the hash template class. I've added them to graph/detail/adjacency_list.hpp. The changes are now in boost CVS. After making those changes I was able to get the adjacency_list.cpp file to compile and run properly with the OutEdgeList=hash_setS. On Fri, 23 Aug 2002, Sandeep Bhutani wrote: bhutan> Can you please help? Has anyone used the has feature bhutan> in the graph library. I had to edit the line number bhutan> 166 in adjacency_list.hpp to replace hash_set with bhutan> hash_map. You should not need to make that change. adjacency_list only uses hash_set now. Regards, Jeremy ---------------------------------------------------------------------- Jeremy Siek http://php.indiana.edu/~jsiek/ Ph.D. Student, Indiana Univ. B'ton email: jsiek@osl.iu.edu C++ Booster (http://www.boost.org) office phone: (812) 855-3608 ----------------------------------------------------------------------

Hi Jeremy, Appreciate your prompt response. That fix works! I think, someone else (Matthias) was able to get it to work without this. I guess that is something to do with different compilers. Thanks -Sandeep Jeremy Siek wrote:
Hi Sandeep,
It looks like there were some missing specializations of the hash template class. I've added them to graph/detail/adjacency_list.hpp. The changes are now in boost CVS.
After making those changes I was able to get the adjacency_list.cpp file to compile and run properly with the OutEdgeList=hash_setS.
On Fri, 23 Aug 2002, Sandeep Bhutani wrote: bhutan> Can you please help? Has anyone used the has feature bhutan> in the graph library. I had to edit the line number bhutan> 166 in adjacency_list.hpp to replace hash_set with bhutan> hash_map.
You should not need to make that change. adjacency_list only uses hash_set now.
Regards, Jeremy
---------------------------------------------------------------------- Jeremy Siek http://php.indiana.edu/~jsiek/ Ph.D. Student, Indiana Univ. B'ton email: jsiek@osl.iu.edu C++ Booster (http://www.boost.org) office phone: (812) 855-3608 ----------------------------------------------------------------------
Info: <http://www.boost.org> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> Unsubscribe: <mailto:boost-users-unsubscribe@yahoogroups.com>
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
participants (3)
-
Jeremy Siek
-
Matthias Kronenberger
-
Sandeep Bhutani