No need for &centroid, &distance

This commit is contained in:
Thomas Forgione 2018-02-28 15:09:03 +01:00
parent 77ea216075
commit a9ccb379c6
No known key found for this signature in database
GPG Key ID: C75CD416BD1FFCE1
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ fn main() {
"green", "green",
]; ];
let (kmeans, nb_iterations) = kmeans(elements, initial, &distance, &centroid, 1000).unwrap(); let (kmeans, nb_iterations) = kmeans(elements, initial, distance, centroid, 1000).unwrap();
let kmeans = kmeans.into_iter(); let kmeans = kmeans.into_iter();
println!("Converged in {} iterations.", nb_iterations); println!("Converged in {} iterations.", nb_iterations);