Registry / utility / pdqselect

pdqselect

JSON →
library0.1.1rscratesunverified

Selects the kth smallest element of a slice, based on Pattern Defeating Quickselect.

# Cargo.toml [dependencies] pdqselect = "0.1.1"
INSTALL
IMPORT
SIG · PDQSELECT
P
pdqselect
utilityrustv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

select_by
use pdqselect::select_by;

Select the 4th smallest element from a slice.

use pdqselect::select_by; fn main() { let mut data = vec![3, 1, 4, 1, 5, 9, 2, 6]; select_by(&mut data, 3, |a, b| a.cmp(b)); println!("4th smallest: {}", data[3]); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
pdqselect — cargo add pdqselect · libregistry