3个版本 (重大更新)
使用旧的Rust 2015
| 0.3.0 | 2018年2月9日 |
|---|---|
| 0.2.0 | 2017年12月1日 |
| 0.1.0 | 2017年11月7日 |
#2382 in 算法
1,279 每月下载量
用于 nb2nl
16KB
188 行
此crate提供有序slice的扩展。
许可协议:APACHE-2。
已弃用
此crate已弃用,并由superslice替代。
文档
安装
此crate与Cargo兼容,可在crates.io上找到。将其添加到您的Cargo.toml
[dependencies]
ordslice = "1"
中,并通过使用其Ext特质来增强slice
extern crate ordslice;
use ordslice::Ext;
现在您可以享受到超级快速的lower_bound、upper_bound和equal_range。
为什么这部分不是标准库的一部分?
不用担心,相关工作正在进行中
- 将
binary_search的速度提升至: https://github.com/rust-lang/rust/pull/45333fast_binary_search - 将
lower_bound、upper_bound、equal_range添加到std: https://github.com/rust-lang/rfcs/issues/2184