Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
JGraphT有一个很好的斐波那契堆类。如何使用它来实现Prim 的最小生成树算法?
您必须编写一个包装类来重命名这些方法,因为(粗略浏览 JGraphT Javadocs)看起来这些开发人员并没有实现 Queue 接口。因此,您必须编写一个名为 offer 的方法,该方法只调用 insert 等。(由于这是开源的,您应该考虑在课程本身中进行编辑,并在完成后将您的代码发送给项目。)