tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
tatami::Matrix< Value_, Index_ > Class Template Referenceabstract

Virtual class for a matrix. More...

#include <Matrix.hpp>

Public Types

typedef Value_ value_type
 
typedef Index_ index_type
 

Public Member Functions

virtual Index_ nrow () const =0
 
virtual Index_ ncol () const =0
 
virtual bool is_sparse () const =0
 
virtual double is_sparse_proportion () const =0
 
virtual bool prefer_rows () const =0
 
virtual double prefer_rows_proportion () const =0
 
virtual bool uses_oracle (bool row) const =0
 
virtual std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense (bool row, const Options &opt) const =0
 
virtual std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense (bool row, Index_ block_start, Index_ block_length, const Options &opt) const =0
 
virtual std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense (bool row, VectorPtr< Index_ > indices_ptr, const Options &opt) const =0
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row () const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (std::vector< Index_ > indices) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column () const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (std::vector< Index_ > indices) const
 
virtual std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse (bool row, const Options &opt) const =0
 
virtual std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse (bool row, Index_ block_start, Index_ block_length, const Options &opt) const =0
 
virtual std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse (bool row, VectorPtr< Index_ > indices_ptr, const Options &opt) const =0
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row () const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (std::vector< Index_ > indices) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column () const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (std::vector< Index_ > indices) const
 
virtual std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const =0
 
virtual std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const =0
 
virtual std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const =0
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 
virtual std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const =0
 
virtual std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const =0
 
virtual std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const =0
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 

Detailed Description

template<typename Value_, typename Index_ = int>
class tatami::Matrix< Value_, Index_ >

Virtual class for a matrix.

Template Parameters
ValueData value type, should be numeric.
IndexRow/column index type, should be integer.

Interface for a matrix in the tatami library. This declares methods to iterate through the matrix by row or column, extracting data in either dense or sparse form. Check out DenseMatrix and CompressedSparseMatrix for examples of concrete subclasses.

To access the matrix data, the Matrix methods first return an instance of an extractor class like MyopicDenseExtractor, which can then be used to retrieve the matrix contents. Creation of the extractor depends on a few parameters:

Matrix subclasses should describe whether they are dense/sparse and if they prefer row or column access. This allows users to choose the best method of extracting data from the matrix.

Member Typedef Documentation

◆ value_type

Type of data to be returned by getters.

◆ index_type

Type of index to be returned by the sparse getters.

Member Function Documentation

◆ nrow()

template<typename Value_ , typename Index_ = int>
virtual Index_ tatami::Matrix< Value_, Index_ >::nrow ( ) const
pure virtual

◆ ncol()

template<typename Value_ , typename Index_ = int>
virtual Index_ tatami::Matrix< Value_, Index_ >::ncol ( ) const
pure virtual

◆ is_sparse()

template<typename Value_ , typename Index_ = int>
virtual bool tatami::Matrix< Value_, Index_ >::is_sparse ( ) const
pure virtual

◆ is_sparse_proportion()

template<typename Value_ , typename Index_ = int>
virtual double tatami::Matrix< Value_, Index_ >::is_sparse_proportion ( ) const
pure virtual
Returns
Approximate proportion of the matrix that is sparse.

This is defined as the proportion of matrix elements that lie within sparse submatrices. It is intended for use in Matrix representations that consist of combinations of multiple submatrices (e.g., DelayedBind), allowing them to derive a suitable value for is_sparse() based on whether most of its submatrices are sparse. (A more granular approach would be to report the density of structural non-zero elements, but this may not be known by all representations at construction time.)

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >.

◆ prefer_rows()

template<typename Value_ , typename Index_ = int>
virtual bool tatami::Matrix< Value_, Index_ >::prefer_rows ( ) const
pure virtual

◆ prefer_rows_proportion()

template<typename Value_ , typename Index_ = int>
virtual double tatami::Matrix< Value_, Index_ >::prefer_rows_proportion ( ) const
pure virtual
Returns
Approximate proportion of the matrix that prefers row-level access.

This is defined as the proportion of matrix elements that lie within submatrices that prefer row-level access. It is useful for determining the return value of prefer_rows() in combined matrices consisting of both row- and column-preferred submatrices. In such cases, the net preference can be determined based on the combined size of the submatrices for each preference. (A more granular approach would be to report the iteration cost on each dimension, but this is difficult to estimate.)

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >.

◆ uses_oracle()

template<typename Value_ , typename Index_ = int>
virtual bool tatami::Matrix< Value_, Index_ >::uses_oracle ( bool  row) const
pure virtual
Parameters
rowRow access if true, column access otherwise.
Returns
Whether this matrix's tatami::Extractor classes make use of oracle predictions for row (if row = true) or column access (otherwise).

The output of this method indicates whether callers should construct an oracle for use in ExtractorBase::set_oracle(). If false, callers should not bother to pass an oracle as it will be ignored.

Implemented in tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::ConstantMatrix< Value_, Index_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, and tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >.

◆ dense() [1/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense ( bool  row,
const Options opt 
) const
pure virtual

◆ dense() [2/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense ( bool  row,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
pure virtual

Create an extractor that retrieves a contiguous block of the non-target dimension in dense form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
block_startIndex of the column (if row = true) or row (otherwise) at the start of the block.
block_lengthNumber of columns (if row = true) or rows (otherwise) in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row (if row = true) or column (otherwise) in dense form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ dense() [3/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense ( bool  row,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
pure virtual

Create an extractor that retrieves an indexed subset of the non-target dimension in dense form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
indices_ptrPointer to a vector of sorted and unique column indices (if row = true) or row indices (otherwise). This should be non-NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row (if row = true) or column (otherwise) in dense form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ dense_row() [1/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( const Options opt) const
inline

Create a row-wise extractor that retrieves all columns in dense form.

Parameters
optOptions for extraction.
Returns
Object for extracting each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [2/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create a row-wise extractor that retrieves a contiguous block of columns in dense form.

Parameters
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [3/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create a row-wise extractor that retrieves an indexed subset of columns in dense form.

Parameters
indices_ptrPointer to a vector of sorted and unique column indices. This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [4/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::vector< Index_ indices,
const Options opt 
) const
inline

Create a row-wise extractor that retrieves an indexed subset of columns in dense form.

Parameters
indicesVector of sorted and unique column indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [1/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( const Options opt) const
inline

Create a column-wise extractor that retrieves all rows in dense form.

Parameters
optOptions for extraction.
Returns
Object for extracting each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [2/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create a column-wise extractor that retrieves a contiguous block of rows in dense form.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [3/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create a column-wise extractor that retrieves an indexed subset of rows in dense form.

Parameters
indices_ptrPointer to a vector of sorted and unique row indices. This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [4/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::vector< Index_ indices,
const Options opt 
) const
inline

Create a column-wise extractor that retrieves an indexed subset of rows in dense form.

Parameters
indicesVector of sorted and unique row indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [5/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( ) const
inline

Overload of dense_row() that uses the default options.

Returns
Object for extracting each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [6/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( Index_  block_start,
Index_  block_length 
) const
inline

Overload of dense_row() that uses the default options.

Parameters
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
Returns
Object for extracting a contiguous block from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [7/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( VectorPtr< Index_ indices_ptr) const
inline

Overload of dense_row() that uses the default options.

Parameters
indices_ptrPointer to a vector of sorted and unique column indices. This should be non-NULL.
Returns
Object for extracting an indexed subset from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [8/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::vector< Index_ indices) const
inline

Overload of dense_row() that uses the default options.

Parameters
indicesVector of sorted and unique column indices.
Returns
Object for extracting an indexed subset from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [5/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( ) const
inline

Overload of dense_column() that uses the default options.

Returns
Object for extracting each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [6/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( Index_  block_start,
Index_  block_length 
) const
inline

Overload of dense_column() that uses the default options.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
Returns
Object for extracting a contiguous block from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [7/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( VectorPtr< Index_ indices_ptr) const
inline

Overload of dense_column() that uses the default options.

Parameters
indices_ptrPointer to a vector of sorted and unique row indices. This should be non-NULL.
Returns
Obejct for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [8/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::vector< Index_ indices) const
inline

Overload of dense_column() that uses the default options.

Parameters
indicesVector of sorted and unique row indices.
Returns
Obejct for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ sparse() [1/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse ( bool  row,
const Options opt 
) const
pure virtual

◆ sparse() [2/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse ( bool  row,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
pure virtual

Create an extractor that retrieves a contiguous block of the non-target dimension in sparse form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
block_startIndex of the column (if row = true) or row (otherwise) at the start of the block.
block_lengthNumber of columns (if row = true) or rows (otherwise) in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row (if row = true) or column (otherwise) in sparse form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ sparse() [3/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse ( bool  row,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
pure virtual

Create an extractor that retrieves an indexed subset of the non-target dimension in sparse form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
indices_ptrPointer to a vector of sorted and unique column indices (if row = true) or row indices (otherwise). This should be non-NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row (if row = true) or column (otherwise) in sparse form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ sparse_row() [1/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( const Options opt) const
inline

Create a row-wise extractor that retrieves all columns in sparse form.

Parameters
optOptions for extraction.
Returns
Object for extracting each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [2/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create a row-wise extractor that retrieves a contiguous block of columns in sparse form.

Parameters
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [3/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create a row-wise extractor that retrieves an indexed subset of columns in sparse form.

Parameters
indices_ptrPointer to a vector of sorted and unique column indices. This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [4/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::vector< Index_ indices,
const Options opt 
) const
inline

Create a row-wise extractor that retrieves an indexed subset of columns in sparse form.

Parameters
indicesVector of sorted and unique column indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [1/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( const Options opt) const
inline

Create a column-wise extractor that retrieves all rows in sparse form.

Parameters
optOptions for extraction.
Returns
Object for extracting each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [2/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create a column-wise extractor that retrieves a contiguous block of rows in sparse form.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [3/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create a column-wise extractor that retrieves an indexed subset of rows in sparse form.

Parameters
indices_ptrPointer to a vector of sorted and unique row indices. This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [4/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::vector< Index_ indices,
const Options opt 
) const
inline

Create a column-wise extractor that retrieves an indexed subset of rows in sparse form.

Parameters
indicesVector of sorted and unique row indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [5/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( ) const
inline

Overload of sparse_row() that uses the default options.

Returns
Object for extracting each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [6/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( Index_  block_start,
Index_  block_length 
) const
inline

Overload of sparse_row() that uses the default options.

Parameters
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
Returns
Object for extracting a contiguous block from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [7/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( VectorPtr< Index_ indices_ptr) const
inline

Overload of sparse_row() that uses the default options.

Parameters
indices_ptrPointer to a vector of sorted and unique column indices. This should not be NULL.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [8/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::vector< Index_ indices) const
inline

Overload of sparse_row() that uses the default options.

Parameters
indicesVector of sorted and unique column indices.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [5/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( ) const
inline

Overload of sparse_column() that uses the default options.

Returns
Object for extracting each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [6/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( Index_  block_start,
Index_  block_length 
) const
inline

Overload of sparse_column() that uses the default options.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
Returns
Object for extracting a contiguous block from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [7/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( VectorPtr< Index_ indices_ptr) const
inline

Overload of sparse_column() that uses the default options.

Parameters
indices_ptrPointer to a vector of sorted and unique row indices. This should not be NULL.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [8/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::vector< Index_ indices) const
inline

Overload of sparse_column() that uses the default options.

Parameters
indicesVector of sorted and unique row indices.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ dense() [4/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense ( bool  row,
std::shared_ptr< const Oracle< Index_ > >  oracle,
const Options opt 
) const
pure virtual

Create an oracle-aware extractor that retrieves the full extent of the non-target dimension in dense form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
oracleAn oracle supplying predictions of the next requested row (if row = true) or column (otherwise).
optOptions for extraction.
Returns
Object for extracting each row (if row = true) or columns (otherwise) in dense form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ dense() [5/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense ( bool  row,
std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
pure virtual

Create an oracle-aware extractor that retrieves a contiguous block of the non-target dimension in dense form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
oracleAn oracle supplying predictions of the next requested row (if row = true) or column (otherwise).
block_startIndex of the column (if row = true) or row (otherwise) at the start of the block.
block_lengthNumber of columns (if row = true) or rows (otherwise) in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row (if row = true) or column (otherwise) in dense form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ dense() [6/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense ( bool  row,
std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
pure virtual

Create an oracle-aware extractor that retrieves an indexed subset of the non-target dimension in dense form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
oracleAn oracle supplying predictions of the next requested row (if row = true) or column (otherwise).
indices_ptrPointer to a vector of sorted and unique column indices (if row = true) or row indices (otherwise). This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row (if row = true) or column (otherwise) in dense form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedBind< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ dense_row() [9/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves all columns in dense form.

Parameters
oracleAn oracle supplying row predictions.
optOptions for extraction.
Returns
Object for extracting each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [10/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves a contiguous block of columns in dense form.

Parameters
oracleAn oracle supplying row predictions.
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [11/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in dense form.

Parameters
oracleAn oracle supplying row predictions.
indices_ptrPointer to a vector of sorted and unique column indices. This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [12/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in dense form.

Parameters
oracleAn oracle supplying row predictions.
indicesVector of sorted and unique column indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [9/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves all rows in dense form.

Parameters
oracleAn oracle supplying column predictions.
optOptions for extraction.
Returns
Object for extracting each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [10/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves a contiguous block of rows in dense form.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
oracleAn oracle supplying column predictions.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [11/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in dense form.

Parameters
oracleAn oracle supplying column predictions.
indices_ptrPointer to a vector of sorted and unique row indices. This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [12/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in dense form.

Parameters
oracleAn oracle supplying column predictions.
indicesVector of sorted and unique row indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [13/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle) const
inline

Overload of dense_row() that uses the default options.

Parameters
oracleAn oracle supplying row predictions.
Returns
Object for extracting each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [14/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length 
) const
inline

Overload of dense_row() that uses the default options.

Parameters
oracleAn oracle supplying row predictions.
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
Returns
Object for extracting a contiguous block from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [15/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr 
) const
inline

Overload of dense_row() that uses the default options.

Parameters
indices_ptrPointer to a vector of sorted and unique column indices. This should not be NULL.
oracleAn oracle supplying row predictions.
Returns
Object for extracting an indexed subset from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_row() [16/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices 
) const
inline

Overload of dense_row() that uses the default options.

Parameters
indicesVector of sorted and unique column indices.
oracleAn oracle supplying row predictions.
Returns
Object for extracting an indexed subset from each row in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [13/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle) const
inline

Overload of dense_column() that uses the default options.

Parameters
oracleAn oracle supplying column predictions.
Returns
Object for extracting each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [14/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length 
) const
inline

Overload of dense_column() that uses the default options.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
oracleAn oracle supplying column predictions.
Returns
Object for extracting a contiguous block from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [15/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr 
) const
inline

Overload of dense_column() that uses the default options.

Parameters
indices_ptrPointer to a vector of sorted and unique row indices. This should not be NULL.
oracleAn oracle supplying column predictions.
Returns
Object for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ dense_column() [16/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::dense_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices 
) const
inline

Overload of dense_column() that uses the default options.

Parameters
indicesVector of sorted and unique row indices.
oracleAn oracle supplying column predictions.
Returns
Object for extracting an indexed subset from each column in dense form. This should not outlive the parent Matrix from which it was created.

◆ sparse() [4/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse ( bool  row,
std::shared_ptr< const Oracle< Index_ > >  oracle,
const Options opt 
) const
pure virtual

Create an oracle-aware extractor that retrieves the full extent of the non-target dimension in sparse form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
oracleAn oracle supplying predictions of the next requested row (if row = true) or column (otherwise).
optOptions for extraction.
Returns
Object for extracting each row (if row = true) or columns (otherwise) in sparse form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ sparse() [5/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse ( bool  row,
std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
pure virtual

Create an oracle-aware extractor that retrieves a contiguous block of the non-target dimension in sparse form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
oracleAn oracle supplying predictions of the next requested row (if row = true) or column (otherwise).
block_startIndex of the column (if row = true) or row (otherwise) at the start of the block.
block_lengthNumber of columns (if row = true) or rows (otherwise) in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row (if row = true) or column (otherwise) in dense form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedTranspose< Value_, Index_ >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ sparse() [6/6]

template<typename Value_ , typename Index_ = int>
virtual std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse ( bool  row,
std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
pure virtual

Create an oracle-aware extractor that retrieves an indexed subset of the non-target dimension in sparse form.

Parameters
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
oracleAn oracle supplying predictions of the next requested row (if row = true) or column (otherwise).
indices_ptrPointer to a vector of sorted and unique column indices (if row = true) or row indices (otherwise). This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row (if row = true) or column (otherwise) in sparse form. This should not outlive the parent Matrix from which it was created.

Implemented in tatami::DelayedTranspose< Value_, Index_ >, tatami::DenseMatrix< Value_, Index_, Storage_ >, tatami::DenseMatrix< Value_, Index_, std::vector< Value_ > >, tatami::DelayedBinaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::DelayedUnaryIsometricOperation< OutputValue_, InputValue_, Index_, Operation_ >, tatami::ConstantMatrix< Value_, Index_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, ValueStorage_, IndexStorage_, PointerStorage_ >, tatami::CompressedSparseMatrix< Value_, Index_, std::vector< Value_ >, std::vector< Index_ >, std::vector< size_t > >, tatami::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, ValueVectorStorage_, IndexVectorStorage_ >, tatami::FragmentedSparseMatrix< Value_, Index_, std::vector< std::vector< Value_ > >, std::vector< std::vector< Index_ > > >, and tatami::DelayedCast< ValueOut_, IndexOut_, ValueIn_, IndexIn_ >.

◆ sparse_row() [9/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves all columns in sparse form.

Parameters
oracleAn oracle supplying row predictions.
optOptions for extraction.
Returns
Object for extracting each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [10/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves a contiguous block of columns in sparse form.

Parameters
oracleAn oracle supplying row predictions.
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [11/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in sparse form.

Parameters
oracleAn oracle supplying row predictions.
indices_ptrPointer to a vector of sorted and unique column indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [12/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices,
const Options opt 
) const
inline

Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in sparse form.

Parameters
oracleAn oracle supplying row predictions.
indicesVector of sorted and unique column indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [9/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves all rows in sparse form.

Parameters
oracleAn oracle supplying column predictions.
optOptions for extraction.
Returns
Object for extracting each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [10/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves a contiguous block of rows in sparse form.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
oracleAn oracle supplying column predictions.
optOptions for extraction.
Returns
Object for extracting a contiguous block from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [11/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in sparse form.

Parameters
oracleAn oracle supplying column predictions.
indices_ptrPointer to a vector of sorted and unique row indices. This should not be NULL.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [12/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices,
const Options opt 
) const
inline

Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in sparse form.

Parameters
oracleAn oracle supplying column predictions.
indicesVector of sorted and unique row indices.
optOptions for extraction.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [13/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle) const
inline

Overload of sparse_row() that uses the default options.

Parameters
oracleAn oracle supplying row predictions.
Returns
Object for extracting each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [14/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length 
) const
inline

Overload of sparse_row() that uses the default options.

Parameters
block_startIndex of the column at the start of the block.
block_lengthNumber of columns in the block.
oracleAn oracle supplying row predictions.
Returns
Object for extracting a contiguous block from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [15/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr 
) const
inline

Overload of sparse_row() that uses the default options.

Parameters
oracleAn oracle supplying row predictions.
indices_ptrPointer to a vector of sorted and unique column indices.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_row() [16/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_row ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices 
) const
inline

Overload of sparse_row() that uses the default options.

Parameters
oracleAn oracle supplying row predictions.
indicesVector of sorted and unique column indices.
Returns
Object for extracting an indexed subset from each row in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [13/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle) const
inline

Overload of sparse_column() that uses the default options.

Parameters
oracleAn oracle supplying column predictions.
Returns
Object for extracting each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [14/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length 
) const
inline

Overload of sparse_column() that uses the default options.

Parameters
block_startIndex of the row at the start of the block.
block_lengthNumber of rows in the block.
oracleAn oracle supplying column predictions.
Returns
Object for extracting a contiguous block from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [15/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
VectorPtr< Index_ indices_ptr 
) const
inline

Overload of sparse_column() that uses the default options.

Parameters
indices_ptrPointer to a vector of sorted and unique row indices.
oracleAn oracle supplying column predictions.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

◆ sparse_column() [16/16]

template<typename Value_ , typename Index_ = int>
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > tatami::Matrix< Value_, Index_ >::sparse_column ( std::shared_ptr< const Oracle< Index_ > >  oracle,
std::vector< Index_ indices 
) const
inline

Overload of sparse_column() that uses the default options.

Parameters
indicesVector of sorted and unique row indices.
oracleAn oracle supplying column predictions.
Returns
Object for extracting an indexed subset from each column in sparse form. This should not outlive the parent Matrix from which it was created.

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