fix: code cleanup, documentation

This commit is contained in:
Volodymyr Orlov
2020-08-27 11:37:14 -07:00
parent 7a7b0d6875
commit aa458d22fa
10 changed files with 147 additions and 64 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ impl<T: Debug, F: FloatExt, D: Distance<T, F>> CoverTree<T, F, D> {
}
}
pub fn new_node(&mut self, parent: Option<NodeId>, data: T) -> NodeId {
fn new_node(&mut self, parent: Option<NodeId>, data: T) -> NodeId {
let next_index = self.nodes.len();
let node_id = NodeId { index: next_index };
self.nodes.push(Node {
@@ -300,7 +300,7 @@ impl<T: Debug, F: FloatExt, D: Distance<T, F>> CoverTree<T, F, D> {
}
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub struct NodeId {
struct NodeId {
index: usize,
}
+1 -1
View File
@@ -1,3 +1,3 @@
pub mod bbd_tree;
pub(crate) mod bbd_tree;
pub mod cover_tree;
pub mod linear_search;