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

#include <genesis/tree/mass_tree/kmeans.hpp>

Inherits Kmeans< MassTree >.

Detailed Description

Definition at line 53 of file tree/mass_tree/kmeans.hpp.

Public Member Functions

 MassTreeKmeans ()=default
 
 MassTreeKmeans (MassTreeKmeans const &)=default
 
 MassTreeKmeans (MassTreeKmeans &&)=default
 
virtual ~MassTreeKmeans ()=default
 
size_t accumulate_centroid_masses () const
 
void accumulate_centroid_masses (size_t value)
 
MassTreeKmeansoperator= (MassTreeKmeans const &)=default
 
MassTreeKmeansoperator= (MassTreeKmeans &&)=default
 
- Public Member Functions inherited from Kmeans< MassTree >
 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< MassTree > const & centroids () const
 
Kmeanscentroids (std::vector< MassTree > const &value)
 
void clear ()
 
ClusteringInfo cluster_info (std::vector< MassTree > 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< MassTree > const &data, size_t const k)
 

Public Types

using Point = MassTree
 
- Public Types inherited from Kmeans< MassTree >
enum  InitializationStrategy
 
using value_type = MassTree
 

Additional Inherited Members

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

Constructor & Destructor Documentation

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

Member Function Documentation

size_t accumulate_centroid_masses ( ) const

Definition at line 54 of file tree/mass_tree/kmeans.cpp.

void accumulate_centroid_masses ( size_t  value)

Definition at line 59 of file tree/mass_tree/kmeans.cpp.

MassTreeKmeans& operator= ( MassTreeKmeans const &  )
default
MassTreeKmeans& operator= ( MassTreeKmeans &&  )
default

Member Typedef Documentation

using Point = MassTree

Definition at line 62 of file tree/mass_tree/kmeans.hpp.


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