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"
27 IMPKMEANS_BEGIN_NAMESPACE
92 KMeans(
const std::string& fname_data,
int dim,
unsigned int max_nPts);
132 const IMP::Floats& get_data_point(
unsigned int i)
const;
154 assert(is_executed_);
155 return centerAssignments_;
162 assert(is_executed_);
163 return ptsSqrDistToCenters_;
168 assert(is_executed_);
169 return pCenters_->getK();
179 void sync_KMdata_pts_from_STL();
190 bool read_pt_from_stream(std::istream& in,
IMP::Floats& p,
unsigned int dim);
199 void read_data_pts_from_stream(std::istream& in,
unsigned int dim,
200 unsigned int max_nPts);
208 void print_pt_to_stream(std::ostream& out,
const IMP::Floats& p);
216 void print_summary(
const internal::KMlocal& theAlg,
232 bool is_KM_data_synced_;
248 internal::KMterm terminationConditions_;
252 IMPKMEANS_END_NAMESPACE
Various general useful macros for IMP.
A nullptr-initialized pointer to an IMP Object.
LogLevel
The log levels supported by IMP.
IMP::Ints get_assignments() const
IMP::Floats get_squared_distance_to_centers() const
Various general useful macros for IMP.
unsigned int get_number_of_centers() const
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Common base class for heavy weight IMP objects.
Various general useful macros for IMP.
A shared base class to help in debugging and things.
unsigned int get_number_of_data_points() const