mirror of
https://github.com/andreytkachenko/kdtree-rust.git
synced 2024-11-21 17:06:24 +04:00
Fixed warnings
This commit is contained in:
parent
793933521c
commit
e6755865f0
@ -54,7 +54,7 @@ impl<KdtreePoint: KdtreePointTrait> Kdtree<KdtreePoint> {
|
||||
/// Can be used if you are sure that the tree is degenerated or if you will never again insert the nodes into the tree.
|
||||
pub fn gather_points_and_rebuild(&mut self) {
|
||||
let mut points : Vec<KdtreePoint> = vec![];
|
||||
let nodes = self.gather_points(0,&mut points);
|
||||
self.gather_points(0,&mut points);
|
||||
|
||||
self.rebuild_tree(&mut points);
|
||||
}
|
||||
|
@ -10,10 +10,6 @@ fn gen_random() -> f64 {
|
||||
rand::thread_rng().gen_range(0., 10000.)
|
||||
}
|
||||
|
||||
fn gen_random_usize( max_value : usize) -> usize {
|
||||
rand::thread_rng().gen_range(0usize, max_value)
|
||||
}
|
||||
|
||||
fn find_nn_with_linear_search<'a>(points : &'a Vec<Point3WithId>, find_for : Point3WithId) -> &Point3WithId {
|
||||
let distance_fun = kdtree::kdtree::distance::squared_euclidean;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user