Question
Asked 16 May 2014

Which data structure in Java provides the function of Fibonacci Heap?

Fibonacci Heap provides function to fast retrieve the minimum cost, remove an element, update an element.

Most recent answer

Zhenzhen Zhang
Tongji University
Dear @Gábor Makrai, 
Thank you for your answer! very helpful.

All Answers (6)

It seems that there is a generic PriorityQueue
class in Java. At least you could search for that
keyword. I have not used it since I prefer C#.
Regards,
Joachim
Mark C. Lewis
Trinity University
The Java API does not provide a Fibonacci heap. The java.util.PriorityQueue is a binary heap. The Fibonacci heap is a rather specialized data structure. For standard priority queue operations the binary heap will actually be faster because the array implementation has low overhead. (The order is lower for some operations on the Fibonacci heap, but the overhead on it is higher and since standard usage is to insert and remove an equal number of elements, both are O(n log n) for doing so.) You use the Fibonacci heap is you need to merge heaps or decrease keys on elements as those operations are not efficient or easily done on binary heaps. If you really need those operations, you will have to either write your own or look for one in a 3rd party library.
1 Recommendation
The Java API does not provide a Fibonacci Heap. This is beacuse the fibonaaci heap probably have more overhead per entry. However, I have found an implementation of Fibonacci heam over the internet. You can take a look at this link ---
2 Recommendations
Zhenzhen Zhang
Tongji University
Thanks very much for all, especially for Alim Gias. Yes, if only needs to get the minimum or insert an element, the PriorityQueue is a better choice. I think the implementation in the link looks good. It will be useful for me.
Gábor Makrai
University of York
I did some experiment with using different versions of existing open-source Fibonacci heap implementations. I run the Dijkstra's algorithm with the help of the different Fibonacci heap's implementations. You can find the results on my blog https://gabormakrai.wordpress.com/2015/02/11/experimenting-with-dijkstras-algorithm/ or on the related GitHub page https://github.com/gabormakrai/dijkstra-performance
1 Recommendation
Zhenzhen Zhang
Tongji University
Dear @Gábor Makrai, 
Thank you for your answer! very helpful.

Similar questions and discussions

Related Publications

Article
this document Although it is rather uncommon to have a section like this in a Thesis, I believe it to be an indispensable part. In a Thesis, like the one before you, some conventions for style and structure are used and some information was speci cally included or left out. I hope the reader will gain from the following remarks and thus will nd his...
Article
Full-text available
JAVA es un lenguaje de programación de propósito general, basado en clases y orientado a objetos, diseñado para tener menores dependencias de implementación. Un hilo, en el contexto de JAVA, es el camino que se sigue al ejecutar un programa. Una aplicación de subproceso único tiene un solo subproceso y solo puede manejar una tarea a la vez. Para ma...
Article
Thèse (M. Sc.)--Université Laval, 1999. Bibliogr.: f. 170-174.
Got a technical question?
Get high-quality answers from experts.