|
kmeans
k-means clustering in C++
|
Interface for matrix data. More...
#include <Matrix.hpp>

Public Member Functions | |
| virtual Index_ | num_observations () const =0 |
| virtual std::size_t | num_dimensions () const =0 |
| virtual std::unique_ptr< RandomAccessExtractor< Index_, Data_ > > | new_extractor () const =0 |
| virtual std::unique_ptr< ConsecutiveAccessExtractor< Index_, Data_ > > | new_extractor (Index_ start, Index_ length) const =0 |
| virtual std::unique_ptr< IndexedAccessExtractor< Index_, Data_ > > | new_extractor (const Index_ *sequence, std::size_t length) const =0 |
| auto | new_known_extractor () const |
| auto | new_known_extractor (Index_ start, Index_ length) const |
| auto | new_known_extractor (const Index_ *sequence, std::size_t length) const |
Interface for matrix data.
This defines the expectations for a matrix of observation-level data to be used in Initialize::run() and Refine::run(). Each matrix should support extraction of the vector of coordinates for each observation.
| Index_ | Integer type of the observation indices. |
| Data_ | Numeric type of the data. |
|
pure virtual |
Implemented in kmeans::SimpleMatrix< Index_, Data_ >.
|
pure virtual |
| [in] | sequence | Pointer to an array of sorted and unique indices of observations, to be accessed in the provided order. It is assumed that the vector will not be deallocated before the destruction of the returned IndexedAccessExtractor. |
| length | Number of observations in sequence. |
Implemented in kmeans::SimpleMatrix< Index_, Data_ >.
|
pure virtual |
| start | Start of the contiguous block of observations to be accessed consecutively. |
| length | Length of the contiguous block of observations to be accessed consecutively. |
Implemented in kmeans::SimpleMatrix< Index_, Data_ >.
|
inline |
Subclasses may override this method to return a pointer to a specific RandomAccessExtractor subclass. This is used for devirtualization in other kmeans functions. If no override is provided, new_extractor() is called instead.
|
inline |
| sequence | Pointer to a sorted and unique array of observations, see the equivalent new_extractor() overload. |
| length | Length of the array, see the equivalent new_extractor() overload. |
Subclasses may override this method to return a pointer to a specific IndexedAccessExtractor subclass. This is used for devirtualization in other kmeans functions. If no override is provided, the relevant new_extractor() overload is called instead.
|
inline |
| start | Start of the contiguous block, see the equivalent new_extractor() overload. |
| length | Length of the contiguous block, see the equivalent new_extractor() overload. |
Subclasses may override this method to return a pointer to a specific ConsecutiveAccessExtractor subclass. This is used for devirtualization in other kmeans functions. If no override is provided, the relevant new_extractor() overload is called instead.
|
pure virtual |
Implemented in kmeans::SimpleMatrix< Index_, Data_ >.
|
pure virtual |
Implemented in kmeans::SimpleMatrix< Index_, Data_ >.