[Lemon-user] Node/Arc Validity
Alpár Jüttner
alpar at cs.elte.hu
Thu Sep 29 17:13:12 CEST 2011
>
> I have a problem using lemon. I use the method valid() to check
> whether a node/arc belongs to a graph. The problem is that when I have
> two graphs G1 and G2 and check if a node N from G1 is valid in G2 it
> returns true… This must not be the case. If there is another method
> for checking the affiliation of a node I would be happy to know it.
Unfortunately, this is something impossible to check.
For efficiency reason, most graph structures internally represent
node/arc structures by their index (i.e. their node/arc id) only. They
don't keep a reference to the graph they belong to.
The function call g.valid(n) simply checks whether there exists a node
in g with id equal to n.id.
Regards,
Alpar
More information about the Lemon-user
mailing list