1#ifndef KMEANS_INITIALIZE_NONE_HPP
2#define KMEANS_INITIALIZE_NONE_HPP
25template<
class Matrix_ = SimpleMatrix<
double,
int>,
typename Cluster_ =
int,
typename Float_ =
double>
28 Cluster_
run(
const Matrix_& matrix, Cluster_ ncenters, Float_*)
const {
29 return std::min(matrix.num_observations(),
static_cast<typename Matrix_::index_type
>(ncenters));
Interface for k-means initialization.
No-op "initialization" with existing cluster centers.
Definition InitializeNone.hpp:26
Cluster_ run(const Matrix_ &matrix, Cluster_ ncenters, Float_ *) const
Definition InitializeNone.hpp:28
Base class for initialization algorithms.
Definition Initialize.hpp:22
Namespace for k-means clustering.
Definition compute_wcss.hpp:12