Type Alias KdMap

Source
pub type KdMap<P, T> = KdTree<(P, T)>;
Expand description

kd-tree of key-value pairs.

let kdmap: kd_tree::KdMap<[isize; 3], &'static str> = kd_tree::KdMap::build(vec![
    ([1, 2, 3], "foo"),
    ([2, 3, 1], "bar"),
    ([3, 1, 2], "buzz"),
]);
assert_eq!(kdmap.nearest(&[3, 1, 2]).unwrap().item.1, "buzz");

Aliased Typeยง

struct KdMap<P, T>(/* private fields */);