A toolkit for working with phylogenetic data.
v0.19.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EuclideanKmeans Class Reference

#include <genesis/utils/math/kmeans.hpp>

Inherits Kmeans< std::vector< double > >.

Detailed Description

Definition at line 685 of file utils/math/kmeans.hpp.

Public Member Functions

 EuclideanKmeans (size_t dimensions)
 
 EuclideanKmeans (EuclideanKmeans const &)=default
 
 EuclideanKmeans (EuclideanKmeans &&)=default
 
virtual ~EuclideanKmeans ()=default
 
EuclideanKmeansoperator= (EuclideanKmeans const &)=default
 
EuclideanKmeansoperator= (EuclideanKmeans &&)=default
 
- Public Member Functions inherited from Kmeans< std::vector< double > >
 Kmeans ()=default
 
 Kmeans (Kmeans const &)=default
 
 Kmeans (Kmeans &&)=default
 
virtual ~Kmeans ()=default
 
std::vector< size_t > const & assignments () const
 
Kmeansassignments (std::vector< size_t > const &value)
 
std::vector< std::vector
< double > > const & 
centroids () const
 
Kmeanscentroids (std::vector< std::vector< double > > const &value)
 
void clear ()
 
ClusteringInfo cluster_info (std::vector< std::vector< double > > const &data) const
 
std::vector< size_t > cluster_sizes () const
 
InitializationStrategy initialization_strategy () const
 
Kmeansinitialization_strategy (InitializationStrategy value)
 
size_t max_iterations () const
 
Kmeansmax_iterations (size_t value)
 
Kmeansoperator= (Kmeans const &)=default
 
Kmeansoperator= (Kmeans &&)=default
 
size_t run (std::vector< std::vector< double > > const &data, size_t const k)
 

Public Types

using Point = std::vector< double >
 
- Public Types inherited from Kmeans< std::vector< double > >
enum  InitializationStrategy
 
using value_type = std::vector< double >
 

Additional Inherited Members

- Protected Member Functions inherited from Kmeans< std::vector< double > >
virtual bool assign_to_centroids (std::vector< std::vector< double > > const &data, std::vector< std::vector< double > > const &centroids, std::vector< size_t > &assignments)
 
virtual ClusteringInfo cluster_info (std::vector< std::vector< double > > const &data, std::vector< size_t > const &assignments, std::vector< std::vector< double > > const &centroids) const
 
virtual std::pair< size_t, double > find_nearest_cluster (std::vector< std::vector< double > > const &centroids, std::vector< double >const &datum) const
 
virtual void initialize (std::vector< std::vector< double > > const &data, size_t const k)
 
virtual bool lloyd_step (std::vector< std::vector< double > > const &data, std::vector< size_t > &assignments, std::vector< std::vector< double > > &centroids)
 
virtual void post_loop_hook (std::vector< std::vector< double > > const &data, std::vector< size_t > &assignments, std::vector< std::vector< double > > &centroids)
 
virtual void pre_loop_hook (std::vector< std::vector< double > > const &data, std::vector< size_t > &assignments, std::vector< std::vector< double > > &centroids)
 
virtual bool treat_empty_centroids (std::vector< std::vector< double > > const &data, std::vector< size_t > &assignments, std::vector< std::vector< double > > &centroids, std::unordered_set< size_t > const &empty_centroids)
 

Constructor & Destructor Documentation

EuclideanKmeans ( size_t  dimensions)

Definition at line 47 of file utils/math/kmeans.cpp.

virtual ~EuclideanKmeans ( )
virtualdefault
EuclideanKmeans ( EuclideanKmeans const &  )
default
EuclideanKmeans ( EuclideanKmeans &&  )
default

Member Function Documentation

EuclideanKmeans& operator= ( EuclideanKmeans const &  )
default
EuclideanKmeans& operator= ( EuclideanKmeans &&  )
default

Member Typedef Documentation

using Point = std::vector<double>

Definition at line 694 of file utils/math/kmeans.hpp.


The documentation for this class was generated from the following files: