views:

389

answers:

3

What are some good Java APIs for working with graphs (edges/nodes) as data structures?

Please add references to similar SO questions in comments to this wiki. Please edit the list in this wiki entry directly. Please add summary description of your added projects as answers (one project per answer).

  • JUNG Java Universal Network/Graph Framework
  • JGraphT
  • JDSL - Java Data Structures Library.
A: 

JUNG — the Java Universal Network/Graph Framework--is a software library that provides a common and extendible language for the modeling, analysis, and visualization of data that can be represented as a graph or network.

harschware
+1  A: 

JGraphT - JGraphT is a free Java graph library that provides mathematical graph-theory objects and algorithms. JGraphT supports various types of graphs including:

  • directed and undirected graphs.
  • graphs with weighted / unweighted / labeled or any user-defined edges.
  • various edge multiplicity options, including: simple-graphs, multigraphs, pseudographs.
  • unmodifiable graphs - allow modules to provide "read-only" access to internal graphs.
  • listenable graphs - allow external listeners to track modification events.
  • subgraphs graphs that are auto-updating subgraph views on other graphs.
  • all compositions of above graphs

(Requires Java 1.6)

Kaleb Brasee
JGraph appears to be for visualization.
harschware
I edited to remove JGraph as unsuitable and Jung as mentioned previously. Now follows the one API per answer format... Thanks to @Kaleb Brasee for original post.
harschware
A: 

JDSL - JDSL is the Data Structures Library in Java. It is a collection of Java interfaces and classes that implement fundamental data structures and algorithms, such as:

  • sequences, trees, priority queues, search trees, hash tables
  • sorting and searching algorithms
  • graphs
  • graph traversals, shortest path, minimum spanning tree

(JDSL does not appear to support generics)

harschware