Skip to content
Snippets Groups Projects
Commit eca6498b authored by Boris Stefanovic's avatar Boris Stefanovic
Browse files

last minute quickfix

parent a482d264
No related branches found
No related tags found
No related merge requests found
......@@ -42,8 +42,12 @@ cluster_int_t** kmeans_init_clusters_int(const vector_int_t** points, const size
// check center is not already in clusters, although probability is extremely low...
valid = !is_vector_in_centers_int(center, (const cluster_int_t**) clusters, i);
}
cluster_destroy_int(clusters[i]);
clusters[i] = cluster_create_int(center);
}
// free
vector_destroy_int(min);
vector_destroy_int(max);
return clusters;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment