[−][src]Type Definition kd_tree::KdMapSlice
type KdMapSlice<P, T> = KdSlice<(P, T)>;
kd-tree slice of key-value pairs.
let mut items: Vec<([isize; 3], &'static str)> = vec![ ([1, 2, 3], "foo"), ([2, 3, 1], "bar"), ([3, 1, 2], "buzz"), ]; let kdmap = kd_tree::KdMapSlice::sort(&mut items); assert_eq!(kdmap.nearest(&[3, 1, 2]).unwrap().item.1, "buzz");