[Lemon-user] A quick question
Alpár Jüttner
alpar at cs.elte.hu
Mon Jan 10 23:23:38 CET 2011
On Mon, 2011-01-10 at 16:07 -0600, Yongjia Song wrote:
> Hi, all,
>
> I am a new user of lemon. I find it a little inconvenient when using
> lemon in this situation. Suppose I would like to run a maxflow from s
> to t, and the graph is constructed beforehand.
>
> Now I could not figure out a way to specify node s and node t
> efficiently, (Naturally, we can just specify nodes by their index, but
> it does not seem to have such kind of index in lemon)
>
> unless I specify them in the first place or write the nodes in a .lgf
> file.
> So is there an efficient way to specify nodes in the graph?
There is an @attribute section for this purpose in the .lgf format, see
http://lemon.cs.elte.hu/pub/doc/1.2.1/a00002.html
You can specify the nodes there, then read them with the node() named
parameter of DigraphReader, see the example code at:
http://lemon.cs.elte.hu/pub/doc/1.2.1/a00108.html
Regards,
Alpar
More information about the Lemon-user
mailing list