Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Cluster_engine_k_means_com_Sd< VectorType, CenterOfMassInitializer > Class Template Reference

Representation of a center of mass in k-means algorithm. More...

#include <Cluster_engine_k_means_center_of_mass.hpp>

Constructors

 T_Cluster_engine_k_means_com_Sd (unsigned d)
 Initialize the center of mass at the origin in a D-dimensional space. More...
 
 T_Cluster_engine_k_means_com_Sd (const Point &p)
 Initialize the center of mass from a unique point. More...
 

Accessors

const Point & get (void) const
 
void add_next (const Point &p)
 
Self get_next (void) const
 
size_t get_num_points () const
 

Detailed Description

template<class VectorType, class CenterOfMassInitializer>
class SBL::GT::T_Cluster_engine_k_means_com_Sd< VectorType, CenterOfMassInitializer >

Representation of a center of mass in k-means algorithm.

Representation of a center of mass for k-means on the unit sphere S^d.

The representation used for a center on the unit sphere S^d. must provide a += operation since we accumulate points on a center. Also expected is a functor to initialize the center of mass on the unit sphere–an operation depending on the type used.

Template Parameters
PointTypeRepresentation of a point.
VectorTypeRepresentation of a vector.

Constructor & Destructor Documentation

◆ T_Cluster_engine_k_means_com_Sd() [1/2]

T_Cluster_engine_k_means_com_Sd ( unsigned  d)
inline

Initialize the center of mass at the origin in a D-dimensional space.

◆ T_Cluster_engine_k_means_com_Sd() [2/2]

T_Cluster_engine_k_means_com_Sd ( const Point &  p)
inline

Initialize the center of mass from a unique point.