Looking for a simple Java API for creating graphs (edges + nodes)

32,606

Solution 1

JGraphT sounds like what you're after.

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

Their API can create graphs from various input and also supports creating graphs using addVertex, addEdge. They support finding shortest paths using various well know algorithms such as Bellman-Ford and Dijkstra They also have a complete javadoc available online.

Solution 2

JDLS is a great library for Graphs and Datastructures in general. You could also use the Grappa library. Its advantage is that it can use the graphViz libraries for graph layouting.

Solution 3

Definitly You should try the http://neo4j.org/ This is great Graph database written in Java but It can work as a embedded database to very small application too.

This database have everything You need even if you plan to store billions of nodes. Good luck.

Share:
32,606
David Koelle
Author by

David Koelle

I create usable software products from new ideas. Author of JFugue (Java API for music programming), experienced presenter, proponent of awesome user interfaces, project manager. Starting at age 7, cut my programming teeth on the TRS-80 and TI-99/4A, then went on to Commodore 64 and Commodore 128. Was a big fan of RUN Magazine. Evolved from BASIC to Turbo Pascal, in which I wrote my own UI framework. Professional experience includes a range of languages, primarily Java. Branching into Android, Scala, and HTML5/CSS3/JavaScript. On Twitter: http://www.twitter.com/dkoelle

Updated on July 17, 2022

Comments

  • David Koelle
    David Koelle almost 2 years

    I'm trying to find a simple Java API for creating graph relationships. It should have some functionality like addEdge(), addNode(), isConnected(node1, node2), findPaths(node1, node2), etc. I need no UI, just logic.

    I found a bunch of academic projects, but none seems to be "The Definitive Graph API".

    Does anyone know about such an API?