[Lemon-user] Hao Orlin problem

Péter Kovács kpeter at inf.elte.hu
Sat Jul 22 07:22:29 CEST 2017


Dear André,

The problem is with the node map type you used. 
lemon::concepts::ReadWriteMap is a "concept" that defines the common 
requirements of read-writable maps, is is not to be used directly.

You should use Graph::NodeMap (similarly to Graph::EdgeMap, that you 
already use for edge lengths). That is, partionMap should be declared 
this way:
     Graph::NodeMap<bool> partitionMap(g);

The commented line won't cause problems after this change.

Regards,
Péter


> Hello, I am trying to use the Hao Orlin algorithm to partition a graph
> while minimizing (sort of) the number of edges that cross the cut.
>
> I am currently having problems figuring out which nodes went to which
> side of the cut. I am sending an example code attached to this message.
> It is compiled using:
>
> $ g++ hao_orlin.cpp -o hao_orlin -lemon
>
> I have tested it and the commented out line causes a segmentation fault.
>
> What am I doing wrong? How do I use this correctly?
>
>
>
> --
>
>
>
> ------------------------------------------------------------------------
>
> André Saldanha Oliveira
>
> Computer Engineering Undergraduate, Universidade Federal do Rio Grande
> do Sul
>
> Skype: andre.oliveira460
>
> LinkedIn: andresaldanhaoliveira
>
>
>
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
>



More information about the Lemon-user mailing list