Looking for a simple Java API for creating graphs

2019-01-17 16:07发布

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?

6条回答
我只想做你的唯一
2楼-- · 2019-01-17 16:39

a really decent one can be found here: http://javaddlib.sourceforge.net/jdd/

查看更多
Viruses.
3楼-- · 2019-01-17 16:43

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.

查看更多
对你真心纯属浪费
4楼-- · 2019-01-17 16:44

JUNG — the Java Universal Network/Graph Framework - is one of the fastest available (implementing the CERN math library COLT), especially if you want to do graph analysis, centrality measurements (betweennes, pagerank, etc.). Furthermore it allows for network visualization.

查看更多
Viruses.
5楼-- · 2019-01-17 16:48

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.

查看更多
Rolldiameter
6楼-- · 2019-01-17 16:52

Jdigraph is yet another graph library.

查看更多
Lonely孤独者°
7楼-- · 2019-01-17 16:58

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.

查看更多
登录 后发表回答