-1

I am new to use JUNG and guava. I am trying to use JUNG 2.1.1 graphs but I learned that it uses com.google.common.graph. Please tell me which interface is good, and what are the differences (if any)?

import com.google.common.graph.Graph or import edu.uci.ics.jung.graph.Graph;

Syed

Syed
  • 9
  • 1

1 Answers1

0

JUNG 2.1.1 has its own graph type: edu.uci.ics.jung.graph.Graph

The JUNG 3.0 snapshot (not yet released, but currently at head on the Github repo) uses Guava's graph type: com.google.common.graph.Graph (and its sibling types ValueGraph and Network).

I am responsible for both maintaining JUNG (and was one of the original architects) and for the common.graph package (which I created and whose development I've been driving).

If you just want a graph type and will be mostly writing your own code to work with it, I'd use Guava's graph types; we're still developing that API, but it is (IMO) a much better design; it was based in part on looking at the design warts of JUNG's graph model (many of which I was responsible for).

If you need some of the extended capabilities that JUNG provides that Guava's common.graph package doesn't include (algorithms, visualization, etc.) then you've got a choice:

(1) If you want a library that is not going to change, use JUNG 2.1.1. It has some known bugs, which are not going to be fixed in 2.x.

(2) If you are willing to use a library that's not yet fully baked, you can check out JUNG 3.0 from GitHub and use its build setup to create the jars you want. JUNG 3.0 has virtually all of the capabilities of JUNG 2.1.1, and has a significantly improved architecture.

Hope that helps.

Joshua O'Madadhain
  • 2,704
  • 1
  • 14
  • 18
  • Thank you for the detailed answer. I am now using python networkx. I have some real data for which I have made a number of graphs. The task is to compare them, and for that I was investigating different platforms/libraries. The problem is that I also used a python package gMatch4py for the calculations of Graph edit distance (GED) and I found significant differences between networkx and gMatch4py results. I don't know which one is reliable. I have doubts on gMatch4Py. But I will check with JUNG 3.0. – Syed Feb 05 '20 at 20:08
  • How is JUNG 3.0 doing? I'd like to use it to serialize my guava graphs, but reading a few posts from 1-3 years ago I don't know how likely a soon release is. Could you consider releasing a snapshot version on maven, even if it's not yet completely ready? – hunger Feb 10 '20 at 10:56