Boost logo

Boost Users :

Subject: Re: [Boost-users] Default weight map doesn't work for weighted grid graph in A-star search
From: W.P. McNeill (billmcn_at_[hidden])
Date: 2010-07-01 14:33:44

I was trying to avoid inheriting from boost::grid_graph. The only reason I
did it here was because astar_search requires its graph to
define vertex_property_type and vertex_index, and the only way I could see
to do that was with a subclass.

I'll look at defining my own graph class that has a boost::grid_graph as a

I'm still going to have to define vertex_property_type for the class I write
though, right? What should it be: vertex_descriptor?

On Thu, Jul 1, 2010 at 11:01 AM, Jeremiah Willcock <jewillco_at_[hidden]>wrote:

> On Thu, 1 Jul 2010, W.P. McNeill wrote:
> Compiling with
>> Looks like the same error. I included a little more of the error
>> spew in case it helps.
>> One thing I'm confused about: what
>> should weighted_grid::vertex_property_type be? I didn't see anything in the
>> a-star documentation about this type, but I had to add it in order to get
>> things to compile this far. Right now I've got it set to vertex_descriptor,
>> though I get the same error if it's vertices_size_type.
> I think that you shouldn't try to inherit from BGL graph types. There are
> several traits classes that are used to look things up, and those do not
> respect inheritance (i.e., graph_traits<derived> has no relationship to
> graph_traits<base>). You should use a separate external property for your
> weights or define a separate graph type (that may contain a grid_graph, but
> has its own members/specializations for all of the traits).
> -- Jeremiah Willcock
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at