Template Class kmeans_omp
Defined in File kmeans_omp.hpp
Inheritance Relationships
Base Type
public rcppsw::algorithm::clustering::base_clustering_impl< T, policy::NC >
(exhale_interface_classrcppsw_1_1algorithm_1_1clustering_1_1base__clustering__impl)
Class Documentation
-
template<typename T>
class kmeans_omp : public rcppsw::algorithm::clustering::base_clustering_impl<T, policy::NC> Parallel clustering using OpenMP using the Nearest Centroid (NC) membership policy. Suitable for kmeans clustering.
Public Functions
-
inline explicit kmeans_omp(size_t n_threads)
-
inline virtual bool converged(const cluster_vector &clusters) const override
Determine if the clusters have converged and the algorithm should be terminated.
- Returns:
TRUE
if the algorithm has converged,FALSE
otherwise.
-
inline virtual void initialize(std::vector<T> *const data, membership_type<policy::NC> *const membership) override
Perform algorithm-specific clustering initialization (memory localization, etc.).
-
inline virtual void iterate(const std::vector<T> &data, const dist_calc_ftype &dist_func, cluster_vector *const clusters) override
-
inline virtual void post_iter_update(cluster_vector *const clusters) override
-
inline explicit kmeans_omp(size_t n_threads)