Crates.io | buckets |
lib.rs | buckets |
version | 0.1.0 |
source | src |
created_at | 2023-04-12 12:09:28.54922 |
updated_at | 2023-04-12 12:09:28.54922 |
description | O(n) integer sort |
homepage | |
repository | https://github.com/frogtd/buckets |
max_upload_size | |
id | 836797 |
size | 6,230 |
buckets is a crate for sorting lots of things at once.
Add this to your Cargo.toml:
[dependencies]
mean = "0.1"
use buckets::SortWithBucket;
let mut input: Vec<u16> = vec![65444, 50, 12532, 121];
input.sort_with_buckets();
assert_eq!(input, vec![50, 121, 12532, 65444])
#![no_std]
Coming later.
This is nightly because it's blocked on generic_const_exprs
, because I need a constant used in
the output of a trait that is also defined in that trait for arrays. Hopefully I can think of
another way to do this.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.