Crates.io | collate |
lib.rs | collate |
version | 0.4.2 |
source | src |
created_at | 2021-01-05 23:53:02.222905 |
updated_at | 2024-08-13 22:33:27.890681 |
description | Traits and a data structure to support collation and bisection |
homepage | |
repository | http://github.com/haydnv/collate |
max_upload_size | |
id | 332526 |
size | 46,926 |
Rust collation utilities
Example usage:
use collate::*;
let collator = Collator::default();
let collection = [
[1, 2, 3],
[2, 3, 4],
[3, 4, 5],
];
assert_eq!(collator.bisect_left(&collection, &[1]), 0);
assert_eq!(collator.bisect_right(&collection, &[1]), 1);