Boost logo

Boost Users :

Subject: Re: [Boost-users] Default weight map doesn't work for weighted grid graph in A-star search
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-07-14 18:16:06

On Wed, 14 Jul 2010, W.P. McNeill wrote:

> I verified the documentation changes for grid graph indexing calls and
> A* visitors.  Looks good. Now doing edge weights with
> a static_property_map<>.


> I've duplicated relevant information from the README at the top of
> maze.cpp, so README doesn't need to be included in the Boost examples.
> I found that I have to implement my own vertex index map, though I'm not sure exactly why.  If I remove all my vertex index map code and call A* with the
> default map like so:
>     astar_search(m_barrier_grid,
>                  source(),
>                  heuristic,
>                  boost::weight_map(weight).
>                  predecessor_map(pred_pmap).
>                  distance_map(dist_pmap).
>                  visitor(visitor) );
> I get the following error:

That is a bug in astar_search(). Please try with the latest Boost trunk
and see if it works. I also added named parameters to

> I was surprised by this because I expected the filtered graph to inherit
> the grid graph's vertex index map like you describe.

That is what it should do.

-- Jeremiah Willcock

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