GraphStream Users

Archives de la liste Aide


Re: Exception in thread "main" org.graphstream.graph.ElementNotFoundException: Cannot create edge


Chronologique Discussions 
  • From: Stefan Balev <stefan.balev AT gmail.com>
  • To: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>, Adriano Galati <adriano.galati AT disneyresearch.com>
  • Subject: Re: Exception in thread "main" org.graphstream.graph.ElementNotFoundException: Cannot create edge
  • Date: Tue, 26 May 2015 19:30:18 +0200

Hi and welcome !

You should also disable strict checking for this to work:
graph.setStrict(false);

Hope this helps,

--
Stefan


2015-05-26 19:22 GMT+02:00 Adriano Galati <adriano.galati AT disneyresearch.com>:
Hello,
I just using graphstream libs and following the first example.
I am testing graph.setAutoCreate( true );
but I get
Exception in thread "main" org.graphstream.graph.ElementNotFoundException: Cannot create edge BC[B--C]. Node 'C' does not exist.

Was it not supposed to create a node if it was not create before?

graph.addNode("A" );
graph.addNode("B" );
graph.setAutoCreate( true );
graph.addEdge( "AB", "A", "B" );
graph.addEdge( "BC", "B", "C" );
graph.addEdge( "CA", "C", "A" );

Am I missing something?

Kind regards,
Adriano
--
Postdoctoral Researcher
Disney Research Zurich
Stampfenbachstrasse 48
8006 Zurich
Switzerland

Tel:       +41 44 63 38381
URL:     http://people.inf.ethz.ch/galatia





Archives gérées par MHonArc 2.6.16.

Top of page