igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Is it possible to use igraph in Java?


From: Jeff G
Subject: Re: [igraph] Is it possible to use igraph in Java?
Date: Thu, 2 Apr 2009 21:13:10 -0400

Thanks for the replies... I did not see them until I went to the archive... I'm subscribed now so should be able to respond quicker.

Chris, If you know of a good 3d Graph Layout API in Java that could handle 100,000+ nodes, I'd sure like to know what it is.  I've been searching for one with little luck.  JUNG, JGraphT, GINY... I've looked at them but haven't found any that seem to scale as well as igraph states. I was hoping that LGL and DrL would be 3d capable, but hopefully you guys can fix that right up. :-)  From what I've been told, UbiGraph can't scale... I think I remember someone stating that 3000 nodes was a high end.  I'm testing 500,000 random nodes in my app and it's running fast on my laptop (not little squares or points either, cool looking textured objects), I just need a layout to plot it.  I'm not a fan of the Java language either, but the tools in Processing help me get some things done.  So I'm working with that for now.

Tamas, I'll give that a try!  You are correct that I just need to plot the coordinates with Igraph, then I can import it.  So this should be something I can work with.  I also try out the rJava as well if you guys think that might work.  I direct interface to R and iGraph would be prefered to scripting an export/import.

Thanks,
Jeff

From: Chris Wj
Subject: Re: [igraph] Is it possible to use igraph in Java?
Date: Thu, 2 Apr 2009 17:38:34 -0400

There are enough java graph visualization tools floating around already, and many of them open up the standard graph files that igraph generates. This is where igraph would benefit from a way to write graph files to any file like object instead of just to a file on disk. I think you should go the python or C++ route and forego the java, but that's just my opinion (I'm not the java lover). If you want some cool visualization check out UbiGraph; it's really simple to use. I'd love to write an igraph interface for it.



On Thu, Apr 2, 2009 at 12:25 PM, Tamas Nepusz <address@hidden> wrote:
Could rJava be used to interface with R, which calls igraph?
http://www.rforge.net/rJava/
I guess rJava works the other way round; i.e., it allows you to access Java objects from R.


Another idea, I'm not sure I need full integration.  Could an output layout be written that includes the x,y,z coords for each node/edge, so that it could be imported into a java app and plotted?
Do you mean that you want to generate a layout with igraph, save the coordinates and then use that to plot something in Processing? That should be simple; assuming that g is your graph in Python, you can simply do as follows:

from igraph import *

# Construct your graph here

layout = g.layout("kamada_kawai_3d")
f = file("layout.txt", "w")
for x, y, z in layout:
 print >>f, x, y, z
f.close()


You can also construct a Python script that simply writes the coordinates to stdout and then call it from Java and read the output of the Python script directly.

--
Tamas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]