[Lemon-user] GraphCopy - directed vs. undirected

Mitcsenkov Attila mitcsenkov at tmit.bme.hu
Tue Feb 2 21:02:24 CET 2010


Hi,

I would like to create a directed copy of an undirected graph.
More detailed: I have a ListGraph instance, and based on that I want to create a directed graph, with two directed arcs instead of any undirected edge, with some edgemap values "duplicated", e.g. if length[e] was 5 in the undirected graph, I want to have two directed arcs, both with length 5.

Once I was using Lemon 0.x, it was working by using graphcopy.

Now I cannot solve the problem, since the GraphCopy and DigraphCopy needs two undirected or two directed graphs.
I have tried to use the Orienter/Undirector adaptors, but with those I have the following error messages:

3>.\OptimalLP.cpp(52) : error C2664: 'lemon::DigraphCopy<From,To>::DigraphCopy(const From &,To &)' : cannot convert parameter 1 from 'lemon::Orienter<GR,DM>' to 'const lemon::ListDigraph &'
3>        with
3>        [
3>            From=lemon::ListDigraph,
3>            To=lemon::ListDigraph
3>        ]
3>        and
3>        [
3>            GR=const lemon::ListGraph,
3>            DM=const lemon::GraphExtender<lemon::ListGraphBase>::EdgeMap<bool>
3>        ]
3>        Reason: cannot convert from 'lemon::Orienter<GR,DM>' to 'const lemon::ListDigraph'
3>        with
3>        [
3>            GR=const lemon::ListGraph,
3>            DM=const lemon::GraphExtender<lemon::ListGraphBase>::EdgeMap<bool>
3>        ]
3>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called

As far as I understand the concept of graph adaptors, it should be available to use instead of ListDigraph...

Could you please help to solve this?

Thanks:
Attila Mitcsenkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20100202/b75ce823/attachment.html>


More information about the Lemon-user mailing list