fn new(x: &ArrayView1<f64>, max_k: usize, distance: D) -> NearestNeighbors<D> {
        NearestNeighbors {
            x: x.to_owned(),
            // Capacity: max_k + 1 for when we insert a new element and then
            // remove another one from the tail.
            neighbors: Vec::with_capacity(max_k + 1),
            extra_ties: HashMap::new(),
            extra_ties_dist: None,
            updated_k: 0,
            max_k,
            distance,
        }
    }
/// Init a list of neighbors for a specified test object x.
Init a list of neighbors for a specified test object x.
Init a list of neighbors for a specified test object x .
fn new(x: &ArrayView1<f64>, max_k: usize, distance: D) -> NearestNeighbors<D> {
        NearestNeighbors {
            x: x.to_owned(),
            // Capacity: max_k + 1 for when we insert a new element and then
            // remove another one from the tail.
            neighbors: Vec::with_capacity(max_k + 1),
            extra_ties: HashMap::new(),
            extra_ties_dist: None,
            updated_k: 0,
            max_k,
            distance,
        }
    }
fn new ( x : & ArrayView1 < f64 > , max_k : usize , distance : D ) -> NearestNeighbors < D > { NearestNeighbors { x : x . to_owned ( ) , // Capacity: max_k + 1 for when we insert a new element and then // remove another one from the tail. neighbors : Vec :: with_capacity ( max_k + 1 ) , extra_ties : HashMap :: new ( ) , extra_ties_dist : None , updated_k : 0 , max_k , distance , } }
Init a list of neighbors for a specified test object x.
Init a list of neighbors for a specified test object x .
x
&ArrayView1<f64>
max_k
usize
distance
D
x
&ArrayView1<f64>
max_k
usize
distance
D