priority-queue 0.2.0

A Priority Queue implemented as a heap with a function to efficiently change the priority of an item.
Documentation

PriorityQueue

This crate implements a Priority Queue with a function to change the priority of an object. Priority and items are stored in an OrderMap and the queue is implemented as a Heap of indexes.

Please read the API documentation here__

__ https://docs.rs/priority-queue/

Example

.. code:: rust extern crate priority-queue;

  use priority-queue::PriorityQueue;
  
  fn main {
      let mut pq = PriorityQueue::new();

      assert!(pq.is_empty());
      pq.push("Apples", 5);
      pq.push("Bananas", 8);
      pq.push("Strawberries", 23);

      assert_eq!(pq.peek(), &("Strawberries", 23));

      for (item, _) in pq.into_sorted_iter() {
          println!("{}", item);
      }
  }

Contributing

Feel free to contribute to this project with pull requests and/or issues. All contribution should be under a license compatible with the GNU LGPL.