RubyGems.org

This is a fibonacy heap priority queue implementation. That means insert: O(1) decrease_priority: Amortized O(1) delete_min: Amortized O(log n) This project is different from K. Kodamas PQueue in that it allows a decrease key operation. That makes PriorityQueue usable for algorithms like dijkstras shortest path algorithm, while PQueue is more suitable for Heapsort and the like.

installgem install PriorityQueue -v 0.1.0
Authors

Brian Schroeder

4,980 total downloads 408 for this version
Owners

50f981ff37f4abfc1d3a420aae4f6513

Bundler
gem "PriorityQueue", "~> 0.1.0"
Versions
  1. 0.1.0 October 25, 2005