Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph][BGL] Why can not I use edge_index_t?
From: Borja Miñano (bminyano_at_[hidden])
Date: 2013-03-13 10:12:46


Hello Jeremiah,

I am a little confused with the property maps, and I am trying different
things.
What I really want is to define some properties for the edges on a
mutable graph. I am using a distributed adjacency list.
I tried with distributed property maps, with iterator property maps and
now I am trying defining internal properties.
What do you recommend for my case? I want to add and remove edges and
vertices, and the properties should be synchronized between processors.

Thanks,

El 13/03/13 14:54, Jeremiah Willcock escribió:
> On Wed, 13 Mar 2013, bminano wrote:
>
>> Hello,
>>
>> I want to create an iterator_property_map to iterate over the edges,
>> but I
>> cannot declare the following:
>> typedef property_map<Graph, edge_index_t>::const_type EdgeIndexMap;
>> The compilation gives me an error.
>>
>> I am using an adjacency list with vertex and edge properties. I can
>> use a
>> vertex_index_t, so I assumed that I could use the equivalent for
>> edges. But
>> I don't understand why I can't.
>>
>> This is my adjacency list:
>> typedef boost::adjacency_list<vecS, distributedS&lt;mpi_process_group,
>> vecS>, bidirectionalS, property<vertex_index_t, int>, EdgeProperties>
>> Graph;
>>
>> Have anyone deal with something similar?
>
> None of the adjacency_list graph types provides edge_index_t as a
> built-in property map as far as I know. If you need that map, you
> will need to define it as an internal property and fill it in yourself
> (and update it if/when your graph changes). If you just need to use
> it for property maps, internal properties are much easier. If you are
> not mutating your graph's structure, the compressed_sparse_row_graph
> type provides an edge_index_t property automatically as well.
>
> -- Jeremiah Willcock
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
Un saludo,
Borja Miñano
IAC3 - Universitat de les Illes Balears
ParcBit - Edifici 17 (Disset); Local D7
Cra. Valldemossa km. 7,4
E-07121 Palma de Mallorca. Balears. Spain.
Phone: +34 871 967 434

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