heapo 0.1.0

Very simple heap implementations in Rust
Documentation
  • Coverage
  • 88.89%
    8 out of 9 items documented2 out of 7 items with examples
  • Size
  • Source code size: 26.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 336.1 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • mirrajabi/heapo
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mirrajabi

Heapo - Heap implementations in Rust

Currently contains:

Usage

cargo add heapo

Examples

    let mut heap = PairingHeap::new();
    heap.insert(253);
    heap.insert(1231);
    heap.insert(65);
    assert_eq!(heap.peek(), Some(&65));
    assert_eq!(heap.pop(), Some(65));
    heap.delete();
    assert_eq!(heap.peek(), Some(&1231));
    assert_eq!(heap.pop(), Some(1231));
    assert_eq!(heap.peek(), None);
    assert_eq!(heap.pop(), None);
    assert_eq!(heap.is_empty(), true);

License

This project is dual-licensed under the MIT and Apache-2.0 licenses. You can choose either license for your use.