heapify 0.2.0

Convenience functions to turn slices into max-heaps.
Documentation
  • Coverage
  • 100%
    12 out of 12 items documented12 out of 12 items with examples
  • Size
  • Source code size: 36.19 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.41 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ethereal-sheep/heapify
    3 0 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ethereal-sheep

heapify

Crates.io Docs.rs CI Coverage Status

A collection of convenience functions for heapifying a slice in rust.

Quick Start

A simple way to use heapify is with a Vec<T>.

use heapify::*;
let mut vec = vec![5, 7, 9];
make_heap(&mut vec);

pop_heap(&mut vec);
assert_eq!(vec.pop(), Some(9));

pop_heap(&mut vec);
assert_eq!(vec.pop(), Some(7));

assert_eq!(peek_heap(&mut vec), Some(&5));

Installation

Cargo

  • Install the rust toolchain in order to have cargo installed by following this guide.
  • run cargo install heapify

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING.md.