fix: minor refactoring

This commit is contained in:
Volodymyr Orlov
2020-03-31 18:24:01 -07:00
parent 8bb6013430
commit 5766364311
15 changed files with 49 additions and 52 deletions
+4 -4
View File
@@ -5,14 +5,14 @@ use crate::linalg::Matrix;
use crate::math::distance::euclidian;
#[derive(Debug)]
pub struct BBDTree<T: FloatExt + Debug> {
pub struct BBDTree<T: FloatExt> {
nodes: Vec<BBDTreeNode<T>>,
index: Vec<usize>,
root: usize
}
#[derive(Debug)]
struct BBDTreeNode<T: FloatExt + Debug> {
struct BBDTreeNode<T: FloatExt> {
count: usize,
index: usize,
center: Vec<T>,
@@ -23,7 +23,7 @@ struct BBDTreeNode<T: FloatExt + Debug> {
upper: Option<usize>
}
impl<T: FloatExt + Debug> BBDTreeNode<T> {
impl<T: FloatExt> BBDTreeNode<T> {
fn new(d: usize) -> BBDTreeNode<T> {
BBDTreeNode {
count: 0,
@@ -38,7 +38,7 @@ impl<T: FloatExt + Debug> BBDTreeNode<T> {
}
}
impl<T: FloatExt + Debug> BBDTree<T> {
impl<T: FloatExt> BBDTree<T> {
pub fn new<M: Matrix<T>>(data: &M) -> BBDTree<T> {
let nodes = Vec::new();