[Lemon-user] How to know if a graph have already a node

Alpár Jüttner alpar at cs.elte.hu
Mon Feb 14 16:14:48 CET 2011


On Mon, 2011-02-14 at 14:24 +0100, Pierre Moulon wrote:
> Hi,
> 
> 
> I want to know if we could know if a graph have already a node
> register to the element we want to potentially re-add :
> 
> 
> I have test the find (stl) function over the graph note iterator, but
> it do not compiles :
> 
> 
> using namespace lemon; //ask if the graph g already contain a node
> nodeA.
> graphType::NodeIt itA =
> find<graphType::NodeIt,Node>( graphType::NodeIt(g), INVALID, nodeA);
> 
> 
> Do you have a tip to give me ?

Not sure what do you want to achieve. graphType::valid() will tell you
whether or not a Node or Arc is a existing Node, but it is mainly for
debugging purposes. In normal use of LEMON you typically don't want to
use it, especially for iterators.

Could you tell me what is real the problem you are trying solve?

Regards,
Alpar

> 
> 
> Regards,
> Pierre
> _______________________________________________
> 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