Boost logo

Boost Users :

Subject: Re: [Boost-users] grid_graph vertex properties
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2012-01-23 15:11:08


On Mon, 23 Jan 2012, David Doria wrote:

>> This should just be (something like):
>>
>> typedef boost::property_map<GraphType, boost::vertex_index_t>::const_type
>> indexMapType;
>>
>> indexMapType indexMap(get(boost::vertex_index, graph));
>>
>> boost::iterator_property_map<std::vector<float>::iterator, indexMapType>
>> myMap(vertexData.begin(), indexMap);
>>
>> // grid_graph_index_map is internal
>
> Thanks, that seems to do it.
>
> For posterity:
> http://programmingexamples.net/wiki/CPP/Boost/BGL/GridGraphProperties

For future reference, that is the approach to build external property maps
for all types of graphs, not just grid graphs.

-- Jeremiah Willcock


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