|
kmeans
k-means clustering in C++
|
A simple matrix of observations. More...
#include <SimpleMatrix.hpp>


Public Member Functions | |
| SimpleMatrix (const std::size_t num_dimensions, const Index_ num_observations, const Data_ *const data) | |
| Index_ | num_observations () const |
| std::size_t | num_dimensions () const |
| std::unique_ptr< RandomAccessExtractor< Index_, Data_ > > | new_extractor () const |
| std::unique_ptr< ConsecutiveAccessExtractor< Index_, Data_ > > | new_extractor (const Index_ start, const Index_ length) const |
| std::unique_ptr< IndexedAccessExtractor< Index_, Data_ > > | new_extractor (const Index_ *sequence, const std::size_t length) const |
| auto | new_known_extractor () const |
| auto | new_known_extractor (const Index_ start, const Index_) const |
| auto | new_known_extractor (const Index_ *sequence, const std::size_t) const |
Public Member Functions inherited from kmeans::Matrix< Index_, Data_ > | |
| 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 |
Friends | |
| class | SimpleMatrixRandomAccessExtractor< Index_, Data_ > |
| class | SimpleMatrixConsecutiveAccessExtractor< Index_, Data_ > |
| class | SimpleMatrixIndexedAccessExtractor< Index_, Data_ > |
A simple matrix of observations.
This defines a simple column-major matrix of observations where the columns are observations and the rows are dimensions.
| Index_ | Integer type of the observation indices. |
| Data_ | Numeric type of the data. |
|
inline |
| num_dimensions | Number of dimensions. | |
| num_observations | Number of observations. | |
| [in] | data | Pointer to an array of length equal to the product of num_dimensions and num_observations, containing a column-major matrix of observation data. It is expected that the array will not be deallocated during the lifetime of this SimpleMatrix instance. |
|
inlinevirtual |
Implements kmeans::Matrix< Index_, Data_ >.
|
inlinevirtual |
| [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. |
Implements kmeans::Matrix< Index_, Data_ >.
|
inlinevirtual |
| start | Start of the contiguous block of observations to be accessed consecutively. |
| length | Length of the contiguous block of observations to be accessed consecutively. |
Implements kmeans::Matrix< Index_, Data_ >.
|
inline |
Override to assist devirtualization when creating a RandomAccessExtractor.
|
inline |
Override to assist devirtualization when creating a IndexedAccessExtractor.
|
inline |
Override to assist devirtualization when creating a ConsecutiveAccessExtractor.
|
inlinevirtual |
Implements kmeans::Matrix< Index_, Data_ >.
|
inlinevirtual |
Implements kmeans::Matrix< Index_, Data_ >.