feat: adds new distance measures + LU decomposition
This commit is contained in:
+2
-2
@@ -4,12 +4,12 @@ extern crate smartcore;
|
||||
|
||||
use criterion::Criterion;
|
||||
use criterion::black_box;
|
||||
use smartcore::math::distance::euclidian::*;
|
||||
use smartcore::math::distance::*;
|
||||
|
||||
fn criterion_benchmark(c: &mut Criterion) {
|
||||
let a = vec![1., 2., 3.];
|
||||
|
||||
c.bench_function("Euclidean Distance", move |b| b.iter(|| Euclidian::distance(black_box(&a), black_box(&a))));
|
||||
c.bench_function("Euclidean Distance", move |b| b.iter(|| Distances::euclidian().distance(black_box(&a), black_box(&a))));
|
||||
}
|
||||
|
||||
criterion_group!(benches, criterion_benchmark);
|
||||
|
||||
Reference in New Issue
Block a user