MLPACK  1.0.4
allow_empty_clusters.hpp
Go to the documentation of this file.
00001 
00023 #ifndef __MLPACK_METHODS_KMEANS_ALLOW_EMPTY_CLUSTERS_HPP
00024 #define __MLPACK_METHODS_KMEANS_ALLOW_EMPTY_CLUSTERS_HPP
00025 
00026 #include <mlpack/core.hpp>
00027 
00028 namespace mlpack {
00029 namespace kmeans {
00030 
00035 class AllowEmptyClusters
00036 {
00037  public:
00039   AllowEmptyClusters() { }
00040 
00054   template<typename MatType>
00055   static size_t EmptyCluster(const MatType& /* data */,
00056                              const size_t /* emptyCluster */,
00057                              const MatType& /* centroids */,
00058                              arma::Col<size_t>& /* clusterCounts */,
00059                              arma::Col<size_t>& /* assignments */)
00060   {
00061     // Empty clusters are okay!  Do nothing.
00062     return 0;
00063   }
00064 };
00065 
00066 }; // namespace kmeans
00067 }; // namespace mlpack
00068 
00069 #endif