knncolle
Collection of KNN methods in C++
Loading...
Searching...
No Matches
knncolle::Matrix< Index_, Data_ > Class Template Referenceabstract

Interface for matrix data. More...

#include <Matrix.hpp>

Inheritance diagram for knncolle::Matrix< Index_, Data_ >:

Public Member Functions

virtual Index_ num_observations () const =0
 
virtual std::size_t num_dimensions () const =0
 
virtual std::unique_ptr< MatrixExtractor< Data_ > > new_extractor () const =0
 
auto new_known_extractor () const
 

Detailed Description

template<typename Index_, typename Data_>
class knncolle::Matrix< Index_, Data_ >

Interface for matrix data.

This defines the expectations for a matrix of observation-level data to be used in Builder::build_raw().

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

Member Function Documentation

◆ new_extractor()

template<typename Index_ , typename Data_ >
virtual std::unique_ptr< MatrixExtractor< Data_ > > knncolle::Matrix< Index_, Data_ >::new_extractor ( ) const
pure virtual

◆ new_known_extractor()

template<typename Index_ , typename Data_ >
auto knncolle::Matrix< Index_, Data_ >::new_known_extractor ( ) const
inline
Returns
A new consecutive-access extractor.

Subclasses may override this method to return a pointer to a specific MatrixExtractor subclass. This is used for devirtualization in other knncolle functions. If no override is provided, new_extractor() is called instead.

◆ num_dimensions()

template<typename Index_ , typename Data_ >
virtual std::size_t knncolle::Matrix< Index_, Data_ >::num_dimensions ( ) const
pure virtual

◆ num_observations()

template<typename Index_ , typename Data_ >
virtual Index_ knncolle::Matrix< Index_, Data_ >::num_observations ( ) const
pure virtual

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