tatami
C++ API for different matrix representations
|
Virtual class for a matrix. More...
#include <Matrix.hpp>
Public Types | |
typedef Value_ | value_type |
typedef Index_ | index_type |
Virtual class for a matrix.
Value | Data value type, should be numeric. |
Index | Row/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:
tatami::DimensionSelectionType
). We can choose to extract the full extent of the non-target dimension, a contiguous block, or an indexed subset. For example, if we were iterating row-wise through a matrix, we might only be interested in a subset of columns.Oracle
during extractor construction. For example, if we know we will iterate through the matrix by consecutive rows, we could supply a ConsecutiveOracle
to allow Matrix
implementations to optimize for this access pattern.Value_
s. The sparse form is a SparseRange
describing the structural non-zeros for that dimension element.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.
typedef Value_ tatami::Matrix< Value_, Index_ >::value_type |
Type of data to be returned by getters.
typedef Index_ tatami::Matrix< Value_, Index_ >::index_type |
Type of index to be returned by the sparse getters.
|
pure virtual |
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_ >.
|
pure virtual |
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_ >.
|
pure virtual |
This can be used to choose between dense and sparse outputs.
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_ >.
|
pure virtual |
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_ >.
|
pure virtual |
true
, row-wise extraction is preferred; if false
, column-wise extraction is preferred. 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_ >.
|
pure virtual |
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_ >.
row | Row access if true , column access otherwise. |
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_ > > >.
|
pure virtual |
Create an extractor that retrieves the full extent of the non-target dimension in dense form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
opt | Options for extraction. |
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::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_ >, and tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >.
|
pure virtual |
Create an extractor that retrieves a contiguous block of the non-target dimension in dense form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
block_start | Index of the column (if row = true ) or row (otherwise) at the start of the block. |
block_length | Number of columns (if row = true ) or rows (otherwise) in the block. |
opt | Options for extraction. |
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_ >.
|
pure virtual |
Create an extractor that retrieves an indexed subset of the non-target dimension in dense form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
indices_ptr | Pointer to a vector of sorted and unique column indices (if row = true ) or row indices (otherwise). This should be non-NULL. |
opt | Options for extraction. |
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_ >.
|
inline |
|
inline |
Create a row-wise extractor that retrieves a contiguous block of columns in dense form.
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a row-wise extractor that retrieves an indexed subset of columns in dense form.
indices_ptr | Pointer to a vector of sorted and unique column indices. This should not be NULL. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a row-wise extractor that retrieves an indexed subset of columns in dense form.
indices | Vector of sorted and unique column indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
|
inline |
Create a column-wise extractor that retrieves a contiguous block of rows in dense form.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a column-wise extractor that retrieves an indexed subset of rows in dense form.
indices_ptr | Pointer to a vector of sorted and unique row indices. This should not be NULL. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a column-wise extractor that retrieves an indexed subset of rows in dense form.
indices | Vector of sorted and unique row indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
indices_ptr | Pointer to a vector of sorted and unique column indices. This should be non-NULL. |
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
indices | Vector of sorted and unique column indices. |
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
indices_ptr | Pointer to a vector of sorted and unique row indices. This should be non-NULL. |
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
indices | Vector of sorted and unique row indices. |
Matrix
from which it was created.
|
pure virtual |
Create an extractor that retrieves the full extent of the non-target dimension in sparse form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
opt | Options for extraction. |
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::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::DelayedSubset< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetBlock< Value_, Index_ >, tatami::DelayedSubsetSorted< Value_, Index_, SubsetStorage_ >, tatami::DelayedSubsetSortedUnique< Value_, Index_, SubsetStorage_ >, and tatami::DelayedSubsetUnique< Value_, Index_, SubsetStorage_ >.
|
pure virtual |
Create an extractor that retrieves a contiguous block of the non-target dimension in sparse form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
block_start | Index of the column (if row = true ) or row (otherwise) at the start of the block. |
block_length | Number of columns (if row = true ) or rows (otherwise) in the block. |
opt | Options for extraction. |
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_ >.
|
pure virtual |
Create an extractor that retrieves an indexed subset of the non-target dimension in sparse form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
indices_ptr | Pointer to a vector of sorted and unique column indices (if row = true ) or row indices (otherwise). This should be non-NULL. |
opt | Options for extraction. |
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_ >.
|
inline |
|
inline |
Create a row-wise extractor that retrieves a contiguous block of columns in sparse form.
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a row-wise extractor that retrieves an indexed subset of columns in sparse form.
indices_ptr | Pointer to a vector of sorted and unique column indices. This should not be NULL. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a row-wise extractor that retrieves an indexed subset of columns in sparse form.
indices | Vector of sorted and unique column indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
|
inline |
Create a column-wise extractor that retrieves a contiguous block of rows in sparse form.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a column-wise extractor that retrieves an indexed subset of rows in sparse form.
indices_ptr | Pointer to a vector of sorted and unique row indices. This should not be NULL. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create a column-wise extractor that retrieves an indexed subset of rows in sparse form.
indices | Vector of sorted and unique row indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
indices_ptr | Pointer to a vector of sorted and unique column indices. This should not be NULL. |
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
indices | Vector of sorted and unique column indices. |
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
indices_ptr | Pointer to a vector of sorted and unique row indices. This should not be NULL. |
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
indices | Vector of sorted and unique row indices. |
Matrix
from which it was created.
|
pure virtual |
Create an oracle-aware extractor that retrieves the full extent of the non-target dimension in dense form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
oracle | An oracle supplying predictions of the next requested row (if row = true ) or column (otherwise). |
opt | Options for extraction. |
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_ >.
|
pure virtual |
Create an oracle-aware extractor that retrieves a contiguous block of the non-target dimension in dense form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
oracle | An oracle supplying predictions of the next requested row (if row = true ) or column (otherwise). |
block_start | Index of the column (if row = true ) or row (otherwise) at the start of the block. |
block_length | Number of columns (if row = true ) or rows (otherwise) in the block. |
opt | Options for extraction. |
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_ >.
|
pure virtual |
Create an oracle-aware extractor that retrieves an indexed subset of the non-target dimension in dense form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
oracle | An oracle supplying predictions of the next requested row (if row = true ) or column (otherwise). |
indices_ptr | Pointer to a vector of sorted and unique column indices (if row = true ) or row indices (otherwise). This should not be NULL. |
opt | Options for extraction. |
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_ >.
|
inline |
Create an oracle-aware row-wise extractor that retrieves a contiguous block of columns in dense form.
oracle | An oracle supplying row predictions. |
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in dense form.
oracle | An oracle supplying row predictions. |
indices_ptr | Pointer to a vector of sorted and unique column indices. This should not be NULL. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in dense form.
oracle | An oracle supplying row predictions. |
indices | Vector of sorted and unique column indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware column-wise extractor that retrieves a contiguous block of rows in dense form.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
oracle | An oracle supplying column predictions. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in dense form.
oracle | An oracle supplying column predictions. |
indices_ptr | Pointer to a vector of sorted and unique row indices. This should not be NULL. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in dense form.
oracle | An oracle supplying column predictions. |
indices | Vector of sorted and unique row indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
oracle | An oracle supplying row predictions. |
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
oracle | An oracle supplying row predictions. |
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
indices_ptr | Pointer to a vector of sorted and unique column indices. This should not be NULL. |
oracle | An oracle supplying row predictions. |
Matrix
from which it was created.
|
inline |
Overload of dense_row()
that uses the default options.
indices | Vector of sorted and unique column indices. |
oracle | An oracle supplying row predictions. |
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
indices_ptr | Pointer to a vector of sorted and unique row indices. This should not be NULL. |
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.
|
inline |
Overload of dense_column()
that uses the default options.
indices | Vector of sorted and unique row indices. |
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.
|
pure virtual |
Create an oracle-aware extractor that retrieves the full extent of the non-target dimension in sparse form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
oracle | An oracle supplying predictions of the next requested row (if row = true ) or column (otherwise). |
opt | Options for extraction. |
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_ >.
|
pure virtual |
Create an oracle-aware extractor that retrieves a contiguous block of the non-target dimension in sparse form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
oracle | An oracle supplying predictions of the next requested row (if row = true ) or column (otherwise). |
block_start | Index of the column (if row = true ) or row (otherwise) at the start of the block. |
block_length | Number of columns (if row = true ) or rows (otherwise) in the block. |
opt | Options for extraction. |
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_ >.
|
pure virtual |
Create an oracle-aware extractor that retrieves an indexed subset of the non-target dimension in sparse form.
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
oracle | An oracle supplying predictions of the next requested row (if row = true ) or column (otherwise). |
indices_ptr | Pointer to a vector of sorted and unique column indices (if row = true ) or row indices (otherwise). This should not be NULL. |
opt | Options for extraction. |
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_ >.
|
inline |
Create an oracle-aware row-wise extractor that retrieves a contiguous block of columns in sparse form.
oracle | An oracle supplying row predictions. |
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in sparse form.
oracle | An oracle supplying row predictions. |
indices_ptr | Pointer to a vector of sorted and unique column indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware row-wise extractor that retrieves an indexed subset of columns in sparse form.
oracle | An oracle supplying row predictions. |
indices | Vector of sorted and unique column indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware column-wise extractor that retrieves a contiguous block of rows in sparse form.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
oracle | An oracle supplying column predictions. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in sparse form.
oracle | An oracle supplying column predictions. |
indices_ptr | Pointer to a vector of sorted and unique row indices. This should not be NULL. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Create an oracle-aware column-wise extractor that retrieves an indexed subset of rows in sparse form.
oracle | An oracle supplying column predictions. |
indices | Vector of sorted and unique row indices. |
opt | Options for extraction. |
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
oracle | An oracle supplying row predictions. |
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
block_start | Index of the column at the start of the block. |
block_length | Number of columns in the block. |
oracle | An oracle supplying row predictions. |
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
oracle | An oracle supplying row predictions. |
indices_ptr | Pointer to a vector of sorted and unique column indices. |
Matrix
from which it was created.
|
inline |
Overload of sparse_row()
that uses the default options.
oracle | An oracle supplying row predictions. |
indices | Vector of sorted and unique column indices. |
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
block_start | Index of the row at the start of the block. |
block_length | Number of rows in the block. |
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
indices_ptr | Pointer to a vector of sorted and unique row indices. |
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.
|
inline |
Overload of sparse_column()
that uses the default options.
indices | Vector of sorted and unique row indices. |
oracle | An oracle supplying column predictions. |
Matrix
from which it was created.