JGraphT has a nice Fibonacci Heap class. How can I use it to implement Prim's minimum spanning tree algorithm?
Asked
Active
Viewed 1,583 times
3

templatetypedef
- 362,284
- 104
- 897
- 1,065

Nick Heiner
- 119,074
- 188
- 476
- 699
-
1It this part of a homework assignment? – Suppressingfire Nov 21 '09 at 19:27
1 Answers
1
You'd have to write a wrapper class to rename the methods, since (from a cursory look through the JGraphT Javadocs) it doesn't looks like these developers implemented the Queue interface. So you have to write a method called offer that just calls insert, and so on. (Since this is open-source, you should consider making your edits right in the class itself, and sending the project your code when you're done.)