Home Wiki Blog Forum GEXF.net

Gephi forums

Community support

Building a new graph

Automated tasks on server

Building a new graph

Postby csloan123 » 04 Oct 2013 23:03

Hello,

I was just wondering if there was a way to build a graph one node at a time?

So for example, a recursive method which goes through a filesystem from the root, creating a new node each time it hits one and adding the parent as a neighbour. I have briefly looked at writing custom generators, but I am not sure if this is the best solution, or at least not the one I am looking for.

I haven't had much time to look into this, but there does appear to be an addNode() method on a Graph.. but Node can't be instantiated.

Thanks
Conor
csloan123
 
Posts: 6
Joined: 03 Jul 2013 11:17

Re: Building a new graph

Postby seinecle » 05 Oct 2013 18:49

Yes, I think you use a factory method for that. Check all the methods in this example:
https://wiki.gephi.org/index.php/Toolki ... late_Graph

Best,

Clement
http://www.clementlevallois.net
Gephi tutorials and personalized trainings: http://www.clementlevallois.net/training.html
Join the Gephi Facebook group for help and support: https://www.facebook.com/groups/gephi/
User avatar
seinecle
Gephi Community Support
 
Posts: 529
Joined: 08 Feb 2010 17:55
Location: Lyon, France

Re: Building a new graph

Postby csloan123 » 06 Oct 2013 17:01

Hi Clement,

That's exactly what I was looking for, thanks a lot for your quick response!

Regards,
Conor
csloan123
 
Posts: 6
Joined: 03 Jul 2013 11:17


Return to Toolkit

Who is online

Users browsing this forum: No registered users and 0 guests

cron