Hi guys,
Thanks for the clarification Dave, after struggling for for 2 days I
wasn't so sure any more. Still not getting it right though.
It seems the basic structure of the BGL interface works on my graph.
I can run a bfs with "visitor(default_bfs_visitor())" , and it
searches through the graph quite well. However when adding my own
visitor...
Taken from the bfs visitor example:
class bfs_name_printer : public default_bfs_visitor {
public:
bfs_name_printer() { };
template &,
boost::detail::error_property_not_found) [with VertexListGraph =
Network,
P = bfs_name_printer ()(), T = boost::graph_visitor_t, R =
boost::no_property]':
N:/_tools/boost_1_35_0/boost/graph/breadth_first_search.hpp:255:
instantiated from `void boost::breadth_first_search(const
VertexListGraph&, typename boost::graph_traits<G>::vert
ex_descriptor, const boost::bgl_named_params &) [with
VertexListGraph = Network, P = bfs_name_printer ()(), T =
boost::graph_visitor_t, R = boost::no_property]'
N:\_devel\_workspace\GWISeo\src\core\solution.cpp:186: instantiated from here
N:/_tools/boost_1_35_0/boost/graph/breadth_first_search.hpp:226:
error: function return type cannot be function
N:/_tools/boost_1_35_0/boost/graph/named_function_params.hpp:656:
error: function return type cannot be function
N:/_tools/boost_1_35_0/boost/graph/breadth_first_search.hpp:226:
error: function return type cannot be function
N:/_tools/boost_1_35_0/boost/graph/named_function_params.hpp: In
function `typename boost::property_value &,
boost::detail::error_property_not_found) [with VertexListGraph =
Network, P
= bfs_name_printer ()(), T = boost::graph_visitor_t, R = boost::no_property]'
N:/_tools/boost_1_35_0/boost/graph/breadth_first_search.hpp:255:
instantiated from `void boost::breadth_first_search(const
VertexListGraph&, typename boost::graph_traits<G>::vert
ex_descriptor, const boost::bgl_named_params &) [with
VertexListGraph = Network, P = bfs_name_printer ()(), T =
boost::graph_visitor_t, R = boost::no_property]'
N:\_devel\_workspace\GWISeo\src\core\solution.cpp:186: instantiated from here
N:/_tools/boost_1_35_0/boost/graph/named_function_params.hpp:656:
error: function return type cannot be function
N:/_tools/boost_1_35_0/boost/graph/breadth_first_search.hpp:226:
instantiated from `static void
boost::detail::bfs_dispatchboost::detail::error_property_not_found::apply(Vertex
ListGraph&, typename boost::graph_traits<G>::vertex_descriptor, const
boost::bgl_named_params &,
boost::detail::error_property_not_found) [with VertexListGraph =
Network, P
= bfs_name_printer ()(), T = boost::graph_visitor_t, R = boost::no_property]'
N:/_tools/boost_1_35_0/boost/graph/breadth_first_search.hpp:255:
instantiated from `void boost::breadth_first_search(const
VertexListGraph&, typename boost::graph_traits<G>::vert
ex_descriptor, const boost::bgl_named_params &) [with
VertexListGraph = Network, P = bfs_name_printer ()(), T =
boost::graph_visitor_t, R = boost::no_property]'
N:\_devel\_workspace\GWISeo\src\core\solution.cpp:186: instantiated from here
N:/_tools/boost_1_35_0/boost/graph/named_function_params.hpp:662:
error: invalid conversion from `bfs_name_printer (*)()' to `int'
etc.
etc.
***********************************
***********************************
I'm quite sure their must be something I've left out or done wrong
when writing the BGL interface for my graph. If anybody can point me
in the right direction I'd be very grateful.
And advice on how to implement the bundle concept in my own graph
would be great too.
Have a nice day,
Christiaan
2008/7/9 David Abrahams on Wed Jul 09 2008, "Christiaan Putter" Hi guys and girls, I've got an existing Graph structure, consisting of node and edge
classes. The graph structure itself is implicit in the sense that
every node contains a list of out edges, and edges know where they
start from and go to. I'm using Qt's container classes for simplicity mostly, eg. a node has
a QList of successors (QList I've been trying to extend this to work with the BGL, following the
LEDA and SGB examples. As far as I know I can simply use the BGL functions on an instance of
my own Network, ie. no need to recreate the graph. Is this correct? Yes, that's what makes BGL a generic library :-) --
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users