Semi-ready implementation of Simple KNN

This commit is contained in:
Volodymyr Orlov
2019-09-16 08:52:12 -07:00
parent 9c5f6eb307
commit 3efd078034
6 changed files with 125 additions and 99 deletions
+5 -4
View File
@@ -1,8 +1,9 @@
pub mod euclidian;
use num_traits::Float;
pub trait Distance<T> {
fn distance_to(&self, other: &Self) -> f64;
fn distance(a: &Self, b: &T) -> f64;
pub trait Distance<T>
{
fn distance(a: &T, b: &T) -> f64;
}