Registry / utility / kdbush

kdbush

JSON →
library0.2.0rscratesunverified

A very fast static spatial index for 2D points based on a flat KD-tree.

# Cargo.toml [dependencies] kdbush = "0.2.0"
INSTALL
IMPORT
SIG · KDBUSH
K
kdbush
utilityrustv0.2.0
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.

KDTree
use kdbush::KDTree;

Build a KD-tree and query nearest neighbor

use kdbush::KDTree; fn main() { let points = vec![(0.0, 0.0), (1.0, 1.0), (2.0, 2.0)]; let tree = KDTree::build(&points); let nearest = tree.nearest((0.5, 0.5), 1); println!("Nearest point: {:?}", nearest); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
kdbush — cargo add kdbush · libregistry