|
Boost Users : |
Subject: [Boost-users] [Graph] - Do bundled properties break the named parameters paradigm?
From: David Conner (dcconner_at_[hidden])
Date: 2009-01-09 18:08:12
I was trying to work with astar-cities.cpp example and convert to
using bundled property maps for the edge properties.
This caused numerous issues (see yesterdays post for one example).
I found that if I bypass the named parameters and make an explicit
call to astar_search( ) then it works OK.
Does anyone know if the bundle property maps causes general issues
with named parameters?
thanks,
David
--- More info -----------------------------------
Normally, the named parameters would created the property maps that
are needed; e.g. thru the use of
choose_param(cost, make_iterator_property_map
(cost_map.begin(), index_map,
cost_map[0])),
This appears to break if I use a bundled parameter because of some
issues with the limit templates among other things.
If I explicitly create all of the parameters, things work fine.
e.g.
boost::astar_search
(g,
start,
distance_heuristic<mygraph_t, cost, location*>(locations, goal),
astar_goal_visitor<vertex>(goal), // Only the first of named
parameters needs boost::
&pred_map[0] ,//boost::predecessor_map( ),
&cost_map[0] ,//boost::rank_map( ),
&dist_map[0] ,//boost::distance_map( ),
weightmap,//boost::weight_map( ), =========<<<<< This
was the bundled property
&index_map[0],//boost::vertex_index_map( ),//IndexMap,
&clr_map[0] ,//boost::color_map( ) ,
std::less<cost>(),
boost::closed_plus<cost>(),
std::numeric_limits<cost>::max BOOST_PREVENT_MACRO_SUBSTITUTION (),
std::numeric_limits<cost>::min()
);//.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net