Boost logo

Boost :

Subject: Re: [boost] [bgl] Transitive closure
From: Gustavo Gutiérrez (gutierrez.gustavo_at_[hidden])
Date: 2009-08-14 08:42:43


On 14 Aug 2009, at 13:44, Andrew Sutton wrote:

>> typedef boost::adjacency_list<boost::vecS, boost::listS,
>> boost::bidirectionalS,
>> boost::property<boost::vertex_name_t, int> > graph_t;
>>
>
>
>> adjacency_list<> c;
>> boost::transitive_closure(g, c, vmap, tempMap);
>>
>
>
>> Can someone give me a hint on how to solve my problem?
>>
>
>
> It may be because you're using two different graph types. graph_t
> makes the
> vertex_descriptor type a void* (because of the listS for the vertex
> list)
> and the graph c uses size_t (because it defaults to vecS). It might
> be that
> using two different types of graphs isn't a use case for this
> particular
> call. Just speculation.

Mmm, not sure, according with the example at:

http://www.boost.org/doc/libs/1_39_0/libs/graph/example/transitive_closure.cpp

they use

  typedef adjacency_list < listS, listS, directedS, Index > graph_t;
for the initial graph and
adjacency_list <> TC;
for the result. As you can see, from this point of view we are using
the same data structure to store vertices.

> You might also try using the named-parameter version. That may make
> some of
> your problems a litlte more explicit (but maybe not).
>

Good idea, I thought abut using it, however I don't know how to pass
the other map as a named-parameter. Here I am talking about the
argument "orig_to_copy(G_to_TC_VertexMap g_to_tc_map)"

Regards,
Gustavo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk