pub fn knearest_into_d2(
xyz: &[[f64; 3]],
simbox: &Cell,
k: usize,
mask: Option<&[bool]>,
cell_hint: Option<f64>,
out_nn: &mut [i32],
out_d2: Option<&mut [f64]>,
) -> Result<(), Error>Expand description
Write k-nearest indices and squared distances, nearest first.
out_nn has length n * k. Unused index slots are -1.
out_d2, when Some, has the same length; unused slots are NaN.