13 #ifndef MLPACK_METHODS_KMEANS_ALLOW_EMPTY_CLUSTERS_HPP    14 #define MLPACK_METHODS_KMEANS_ALLOW_EMPTY_CLUSTERS_HPP    48   template<
typename MetricType, 
typename MatType>
    51       const size_t emptyCluster,
    52       const arma::mat& oldCentroids,
    53       arma::mat& newCentroids,
    59     newCentroids.col(emptyCluster) = oldCentroids.col(emptyCluster);
    63   template<
typename Archive>
 Linear algebra utility functions, generally performed on matrices or vectors. 
 
The core includes that mlpack expects; standard C++ includes and Armadillo. 
 
AllowEmptyClusters()
Default constructor required by EmptyClusterPolicy policy. 
 
Policy which allows K-Means to create empty clusters without any error being reported. 
 
static force_inline void EmptyCluster(const MatType &, const size_t emptyCluster, const arma::mat &oldCentroids, arma::mat &newCentroids, arma::Col< size_t > &, MetricType &, const size_t)
This function allows empty clusters to persist simply by leaving the empty cluster in its last positi...
 
void serialize(Archive &, const uint32_t)
Serialize the empty cluster policy (nothing to do).