kmeans
k-means clustering in C++
Loading...
Searching...
No Matches
kmeans::SimpleMatrix< Index_, Data_ > Class Template Referencefinal

A simple matrix of observations. More...

#include <SimpleMatrix.hpp>

Inheritance diagram for kmeans::SimpleMatrix< Index_, Data_ >:
Collaboration diagram for kmeans::SimpleMatrix< Index_, Data_ >:

Public Member Functions

 SimpleMatrix (const std::size_t num_dimensions, const Index_ num_observations, const Data_ *const data)
 
- Public Member Functions inherited from kmeans::Matrix< Index_, Data_ >
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
 

Friends

class SimpleMatrixRandomAccessExtractor< Index_, Data_ >
 
class SimpleMatrixConsecutiveAccessExtractor< Index_, Data_ >
 
class SimpleMatrixIndexedAccessExtractor< Index_, Data_ >
 

Detailed Description

template<typename Index_, typename Data_>
class kmeans::SimpleMatrix< 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.

Template Parameters
Index_Integer type of the observation indices.
Data_Numeric type of the data.

Constructor & Destructor Documentation

◆ SimpleMatrix()

template<typename Index_ , typename Data_ >
kmeans::SimpleMatrix< Index_, Data_ >::SimpleMatrix ( const std::size_t num_dimensions,
const Index_ num_observations,
const Data_ *const data )
inline
Parameters
num_dimensionsNumber of dimensions.
num_observationsNumber of observations.
[in]dataPointer 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.

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