我应该如何在Java中表示依赖关系图? [英] How should I represent a dependency graph in Java?

查看:297
本文介绍了我应该如何在Java中表示依赖关系图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一些用于JavaScript依赖管理的代码,并且我正在计算某人已经在Java中解决了依赖关系图问题。

我的第一个尝试是只是在我的JSResource对象上实现可比较的功能,但是如果有多个叶节点没有依赖关系,并且因此没有合理的顺序,除非它们的依赖项受到影响,否则它会落空。

我需要一个图形,然后通过图形来遍历。不是一个不可能的问题,但我想我会在重新发明轮子之前在这里发帖。



干杯,
皮特

解决方案

有关于java图形处理库的讨论。也许它会帮助你。



好Java图形算法库?


I'm working on some code for JavaScript dependency management and I'm figuring someone has tackled the dependency graph problem in Java already.

My first attempt was to just implement comparable on my JSResource object, but it falls over when there are multiple leaf nodes with no dependency and hence no sensible order unless influenced by their dependents.

So I figure I need a graph and then a way to iterate through the graph. Not an impossible problem but I thought I'd post here before reinventing the wheel.

Cheers, Pete

解决方案

There is a discussion about java graph handling libraries. Maybe it will help you.

Good Java graph algorithm library?

这篇关于我应该如何在Java中表示依赖关系图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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