GraphStream Users

Archives de la liste Aide


Re: null pointer at source.addSink(graph);


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: wordg2 AT wordgraph.com, users AT graphstream-project.org
  • Subject: Re: null pointer at source.addSink(graph);
  • Date: Fri, 6 Jul 2012 11:14:21 +0200

Hi Bob,

There was a bug in the GEXF parser that I have fixed.
You can get a fixed version of gs-core here :

|
|

But there is also an error in your GEXF file : you add values
for edge attributes which are not being declared for edges but
for nodes. To use edge attributes, you first have to declare
them in a <attributes class="edge"> element before declaring
nodes and edges.

You can use DGS to skip the declaration part of attributes :

|
|

Tell us if you need more informations.
Regards.

Guilhelm

2012/7/5 <wordg2 AT wordgraph.com>
Guilhelm,
  Thanks for your very prompt reply.
  A sample gexf file is attached.
  Thanks for the snippets of code that should be very helpful.

  using algo-1.1, core-1.1.1, ui-1.1.1

  I hope I don't bore you with this but:
I hava software patent for multi-dimensional outling which represents a graph.

The patent can be seen at http://www.google.com/patents/US6476814 and I think the drawings would tell you the whole story. Essentially, as you do a breadth first search starting at an arbitrary node if a node encountered has edges incident into that node the adjecent node is presented above and indented and distinguished, if incident out it is presented like a tree outline below and indented.

There is a servlet at http://wordgraph.com/map/ If you selected Large Family you can see it in action.  The website was corrupted recently so much of it is in bad shape.

In answer to what kind of graphs I am interested in I would have to say quite a variety.  I am updating the software to use more open source software (like GraphStream) and to be able to handle a vairiety of graph exchange formats.

Here are some other pictures:

http://wordgraph.com/netpic.html
http://wordgraph.com/library.html
http://wordgraph.com/lgfamms.html
http://wordgraph.com/netwg1.html
http://wordgraph.com/mfgprocess.html

Thanks again,
Bob






Quoting guilhelm savin <guilhelm.savin AT gmail.com>:

Hi Bob,

Thanks for your feedback. I fix FileSourceFactory to return a dgs source
when extension is .dgs (before that, it just checks the first line of the
file, trying to match it with DGSxxx).

About GEXF input, it should work so it is not expected ! Can you tell me
what is your version of GraphStream and maybe send me a gexf file that
you are using ?

What kind and format of graph example do you want ?
You can use generators of gs-algo to create fastly some graphs :

|
| http://graphstream-project.org/doc/Generators/Overview-of-generators_1.0/
|

You just have to connect a generator to a FileSink :

|
| Generator gen = new BarabasiAlbertGenerator();
| FileSink out = new FileSinkDGS();
|
| out.begin("myGenerateGraph.dgs");
|
| gen.addSink(out);
| gen.begin();
|
| for (int i = 0; i < 100; i++)
|   gen.nextEvents();
|
| out.end();
| gen.end();
|

Note that actually there is only DGS that support dynamics. We
have to make some work on GEXF to add support for spells. But
you can generate a snapshot of your graph :

|
| Generator gen = new BarabasiAlbertGenerator();
| Graph g       = new AdjacencyListGraph("myGenerateGraph");
| FileSink out  = new FileSinkGEXF();
|
| gen.addSink(g);
| gen.begin();
|
| for (int i = 0; i < 100; i++)
|   gen.nextEvents();
|
| gen.end();
|
| out.writeAll(g, "myGenerateGraph.gexf");
|

Hope this helps ...
Regards.

Guilhelm

2012/7/5 <wordg2 AT wordgraph.com>





--
Guilhelm Savin
PhD Student of Computer Science




Archives gérées par MHonArc 2.6.16.

Top of page