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);
130 const IMP::Floats& get_data_point(
unsigned int i)
const;
151 assert(is_executed_);
152 return centerAssignments_;
159 assert(is_executed_);
160 return ptsSqrDistToCenters_;
165 assert(is_executed_);
166 return pCenters_->getK();
176 void sync_KMdata_pts_from_STL();
187 bool read_pt_from_stream(std::istream& in,
IMP::Floats& p,
unsigned int dim);
196 void read_data_pts_from_stream(std::istream& in,
unsigned int dim,
197 unsigned int max_nPts);
205 void print_pt_to_stream(std::ostream& out,
const IMP::Floats& p);
213 void print_summary(
const internal::KMlocal& theAlg,
229 bool is_KM_data_synced_;
245 internal::KMterm terminationConditions_;
249 IMPKMEANS_END_NAMESPACE
Various general useful macros for IMP.
LogLevel
The log levels supported by IMP.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Various general useful macros for IMP.
IMP::Ints get_assignments() const
Returns the cluster assignment of each data point.
IMP::Floats get_squared_distance_to_centers() const
Various general useful macros for IMP.
unsigned int get_number_of_centers() const
Common base class for heavy weight IMP objects.
A nullptr-initialized pointer to an IMP Object.
A shared base class to help in debugging and things.
unsigned int get_number_of_data_points() const