[Lemon-user] StaticGraph::build

Rafael Arakaki rafaelkendyarakaki at gmail.com
Sun Feb 28 03:37:51 CET 2016


Hello,

In the build method you need to pass a template containing all the arcs the
graph have. This template will have a bunch of pair <int,int> elements.
Each element have two integers: the first and the second. What the
statement says is that your template need to have these arcs ordered by the
first "int" of the pair in a non-decreasing order, like (1,2), (4,3), (9,
5), (9,2) -> look, only the first integer matters in this ordering.
You can use for example the STL list, insert the pairs in any order, then
use the method sort (it'll sort by the first element -
http://www.cplusplus.com/reference/list/list/sort/), then send it to
StaticDigraphBase::build.

Hope it helps.

2016-02-27 16:05 GMT-03:00 John Lagerquist <john at rallytronics.com>:

> I am confused by this statement:
>
> *The pairs must be in a non-decreasing order with respect to their first
> values.*
>
> with respect to the StaticDigraphBase::build member function.
>
> Can someone please clarify?
>
>
>
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
>
>


-- 
*Rafael Kendy Arakaki*
Mestrando em Ciência da Computação
Universidade Estadual de Campinas - Instituto de Computação
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lemon.cs.elte.hu/pipermail/lemon-user/attachments/20160227/4c29fa04/attachment.html>


More information about the Lemon-user mailing list