1#ifndef KMEANS_MATRIX_HPP
2#define KMEANS_MATRIX_HPP
23template<
typename Index_,
typename Data_>
57template<
typename Index_,
typename Data_>
93template<
typename Index_,
typename Data_>
129template<
typename Index_,
typename Data_>
160 virtual std::unique_ptr<RandomAccessExtractor<Index_, Data_> >
new_extractor()
const = 0;
167 virtual std::unique_ptr<ConsecutiveAccessExtractor<Index_, Data_> >
new_extractor(Index_ start, Index_ length)
const = 0;
175 virtual std::unique_ptr<IndexedAccessExtractor<Index_, Data_> >
new_extractor(
const Index_* sequence,
size_t length)
const = 0;
182template<
class Matrix_>
183using Index =
decltype(std::declval<Matrix_>().num_observations());
Interface for matrix data.
Definition Matrix.hpp:130
virtual std::unique_ptr< IndexedAccessExtractor< Index_, Data_ > > new_extractor(const Index_ *sequence, size_t length) const =0
virtual std::unique_ptr< ConsecutiveAccessExtractor< Index_, Data_ > > new_extractor(Index_ start, Index_ length) const =0
virtual std::unique_ptr< RandomAccessExtractor< Index_, Data_ > > new_extractor() const =0
virtual size_t num_dimensions() const =0
virtual Index_ num_observations() const =0
Extractor for accessing random observations.
Definition Matrix.hpp:24
virtual const Data_ * get_observation(Index_ i)=0
Namespace for k-means clustering.
Definition compute_wcss.hpp:12