Crates.io | binary-heap-plus2 |
lib.rs | binary-heap-plus2 |
version | 0.3.2 |
source | src |
created_at | 2020-09-21 23:37:39.071772 |
updated_at | 2020-09-22 02:04:54.911071 |
description | Enhanced version of std::collections::BinaryHeap that supports max, min, and custom-order heaps. |
homepage | |
repository | https://github.com/davidli2010/binary-heap-plus-rs |
max_upload_size | |
id | 291351 |
size | 68,220 |
This is a fork of binary-heap-plus,
add a new generic constructor BinaryHeap::from_vec_cmp_rebuild()
.
binary-heap-plus
is recommended if there are no special requirements.
Enhancement over Rust's std::collections::BinaryHeap
.
It supports the following heaps and still maintains backward compatibility.
BinaryHeap::new()
or ::with_capacity()
BinaryHeap::new_min()
or ::with_capacity_min()
BinaryHeap::new_by()
or ::with_capacity_by()
BinaryHeap::new_by_key()
or ::with_capacity_by_key()
Other notable added methods are:
BinaryHeap::from_vec_cmp()
, BinaryHeap::from_vec()
and BinaryHeap::from_vec_cmp_rebuild()
for more generic construction..into_iter_sorted()
which is less-surprising version of .into_iter()
. The implementation is backported from std
.This crate requires Rust 1.31.1 or later.
See CHANGELOG.md. https://github.com/sekineh/binary-heap-plus-rs/blob/master/CHANGELOG.md
serde1
.See the following discussions for the background of the crate: