12 #ifndef MLPACK_METHODS_KMEANS_HAMERLY_KMEANS_HPP    13 #define MLPACK_METHODS_KMEANS_HAMERLY_KMEANS_HPP    18 template<
typename MetricType, 
typename MatType>
    36   double Iterate(
const arma::mat& centroids,
    37                  arma::mat& newCentroids,
    38                  arma::Col<size_t>& counts);
    44   const MatType& dataset;
    49   arma::vec minClusterDistances;
    52   arma::vec upperBounds;
    54   arma::vec lowerBounds;
    56   arma::Col<size_t> assignments;
    59   size_t distanceCalculations;
    66 #include "hamerly_kmeans_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors. 
 
double Iterate(const arma::mat ¢roids, arma::mat &newCentroids, arma::Col< size_t > &counts)
Run a single iteration of Hamerly's algorithm, updating the given centroids into the newCentroids mat...
 
HamerlyKMeans(const MatType &dataset, MetricType &metric)
Construct the HamerlyKMeans object, which must store several sets of bounds. 
 
size_t DistanceCalculations() const