e2fd3463cce3ae5bf7d68220f28b8625ef52578f
1 #ifndef SYNCLUST_KMEANSCLUSTERING_H
2 #define SYNCLUST_KMEANSCLUSTERING_H
4 #include <cgds/Vector.h>
6 // auxiliary function to obtain a random sample of 1..n with K elements
13 // auxiliary function to compare two sets of centers
21 // assign a vector (represented by its distances to others, as distances[index,])
22 // to a cluster, represented by its center index ==> output is integer in 0..K-1
31 // k-means based on a distance matrix (nstart=10, maxiter=100)
32 int* kmeansWithDistances_core(