8 #ifndef IMPKMEANS_KMEANS_H
9 #define IMPKMEANS_KMEANS_H
11 #include <IMP/kmeans/kmeans_config.h>
12 #include "IMP/kmeans/internal/KMlocal.h"
13 #include "IMP/kmeans/internal/KMdata.h"
14 #include "IMP/kmeans/internal/KMterm.h"
26 IMPKMEANS_BEGIN_NAMESPACE
95 (
const std::string& fname_data,
97 unsigned int max_nPts);
140 const IMP::Floats& get_data_point(
unsigned int i)
const;
143 unsigned int get_number_of_data_points()
const
145 return STLDataPts_.size();
151 void print_centers()
const;
164 assert(is_executed_);
165 return centerAssignments_;
173 assert(is_executed_);
174 return ptsSqrDistToCenters_;
178 unsigned int get_number_of_centers()
const
180 assert( is_executed_ );
181 return pCenters_->getK();
192 void sync_KMdata_pts_from_STL();
203 bool read_pt_from_stream
215 void read_data_pts_from_stream
218 unsigned int max_nPts);
226 void print_pt_to_stream
231 void print_summary(
const internal::KMlocal& theAlg);
244 IMP::Pointer<internal::KMdata> pKMDataPts_;
247 bool is_KM_data_synced_;
250 IMP::Pointer<internal::KMfilterCenters> pCenters_;
263 internal::KMterm terminationConditions_;
267 IMPKMEANS_END_NAMESPACE