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

Representation of a center of mass for k-means in Euclidean spaces. More...

#include <Cluster_engine_k_means_center_of_mass.hpp>

Constructors

 T_Cluster_engine_k_means_com_euclidean (unsigned d)
 Initialize the center of mass at the origin in a D-dimensional space. More...
 
 T_Cluster_engine_k_means_com_euclidean (const Point &p)
 Initialize the center of mass from a unique point. More...
 
 T_Cluster_engine_k_means_com_euclidean (const Vector &com_euclidean)
 Initialize the center of mass from another center of mass. 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 PointType, class VectorType>
class SBL::GT::T_Cluster_engine_k_means_com_euclidean< PointType, VectorType >

Representation of a center of mass for k-means in Euclidean spaces.

The representation used for a center of mass in a Euclidean space. must provide a += operation since we accumulate points on a center.

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

Constructor & Destructor Documentation

◆ T_Cluster_engine_k_means_com_euclidean() [1/3]

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

◆ T_Cluster_engine_k_means_com_euclidean() [2/3]

T_Cluster_engine_k_means_com_euclidean ( const Point &  p)
inline

Initialize the center of mass from a unique point.

◆ T_Cluster_engine_k_means_com_euclidean() [3/3]

T_Cluster_engine_k_means_com_euclidean ( const Vector &  com_euclidean)
inline

Initialize the center of mass from another center of mass.