寻找一个简单的 Java API 来创建图形(边 + 节点) [英] Looking for a simple Java API for creating graphs (edges + nodes)

查看:52
本文介绍了寻找一个简单的 Java API 来创建图形(边 + 节点)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试寻找一个简单的 Java API 来创建图形关系.它应该有一些功能,例如 addEdge()addNode()isConnected(node1, node2)findPaths(node1, node2) 等.我不需要 UI,只需要逻辑.

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.

我找到了一堆学术项目,但似乎没有一个是定义图 API".

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

有人知道这样的 API 吗?

Does anyone know about such an API?

推荐答案

JGraphT 听起来像您想要的.

JGraphT 是一个免费的 Java 图库,提供数学图论对象和算法.JGraphT 支持各种类型的图.

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

他们的 API 可以从各种输入创建图形,还支持使用 addVertexaddEdge 创建图形.他们支持使用各种众所周知的算法找到最短路径,例如 Bellman-Ford 和 Dijkstra 他们还有一个完整的 javadoc 在线提供.

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.

这篇关于寻找一个简单的 Java API 来创建图形(边 + 节点)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆