我应该如何在Java中表示依赖关系图? [英] How should I represent a dependency graph in Java?
问题描述
我正在研究一些用于JavaScript依赖管理的代码,并且我正在计算某人已经在Java中解决了依赖关系图问题。
我的第一个尝试是只是在我的JSResource对象上实现可比较的功能,但是如果有多个叶节点没有依赖关系,并且因此没有合理的顺序,除非它们的依赖项受到影响,否则它会落空。
我需要一个图形,然后通过图形来遍历。不是一个不可能的问题,但我想我会在重新发明轮子之前在这里发帖。干杯,
皮特
有关于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屋!