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
JUNG 2.1.1 has its own graph type:
edu.uci.ics.jung.graph.GraphThe 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 typesValueGraphandNetwork).I am responsible for both maintaining JUNG (and was one of the original architects) and for the
common.graphpackage (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.