tatami
C++ API for different matrix representations
|
Flexible representations for matrix data. More...
Classes | |
class | ArrayView |
View into a pre-allocated array. More... | |
class | BlockSparsifiedWrapper |
Wrap a block dense extractor in the sparse interface. More... | |
class | CompressedSparseColumnMatrix |
Compressed sparse column matrix. More... | |
struct | CompressedSparseContents |
Compressed sparse contents. More... | |
class | CompressedSparseMatrix |
Compressed sparse matrix representation. More... | |
struct | CompressedSparseMatrixOptions |
Options for the CompressedSparseMatrix . More... | |
class | CompressedSparseRowMatrix |
Compressed sparse row matrix. More... | |
class | ConsecutiveOracle |
Predict future accesses along a consecutive sequence. More... | |
class | ConstantMatrix |
Matrix containing a constant value. More... | |
struct | ConvertToCompressedSparseOptions |
Options for convert_to_compressed_sparse() . More... | |
struct | ConvertToDenseOptions |
Options for convert_to_dense() . More... | |
struct | ConvertToFragmentedSparseOptions |
Options for convert_to_fragmented_sparse() . More... | |
struct | CountCompressedSparseNonZerosOptions |
Options for count_compressed_sparse_non_zeros() . More... | |
class | DelayedBinaryIsometricArithmeticHelper |
Helper for delayed binary isometric arithmetic. More... | |
struct | DelayedBinaryIsometricBooleanHelper |
Helper for delayed binary isometric boolean operations. More... | |
struct | DelayedBinaryIsometricCompareHelper |
Helper for delayed binary isometric comparisons. More... | |
class | DelayedBinaryIsometricOperation |
Delayed isometric operations on two matrices. More... | |
class | DelayedBinaryIsometricOperationHelper |
Helper operation interface for DelayedBinaryIsometricOperation . More... | |
class | DelayedBind |
Delayed combining of a matrix. More... | |
class | DelayedCast |
Recast a Matrix to a different interface type. More... | |
class | DelayedSubset |
Delayed subsetting of a matrix with general indices. More... | |
class | DelayedSubsetBlock |
Delayed subsetting to a contiguous block. More... | |
class | DelayedSubsetSorted |
Delayed subsetting of a matrix with sorted indices. More... | |
class | DelayedSubsetSortedUnique |
Delayed subsetting of a matrix with sorted, unique indices. More... | |
class | DelayedSubsetUnique |
Delayed subsetting of a matrix with unique indices. More... | |
class | DelayedTranspose |
Delayed transposition of a matrix. More... | |
class | DelayedUnaryIsometricAbsHelper |
Helper for delayed calculation of the sign of each matrix entry. More... | |
class | DelayedUnaryIsometricAcosHelper |
Helper for delayed calculation of the inverse cosine of each matrix entry. More... | |
class | DelayedUnaryIsometricAcoshHelper |
Helper for delayed calculation of the inverse hyperbolic cosine of each matrix entry. More... | |
class | DelayedUnaryIsometricArithmeticScalarHelper |
Helper for delayed unary isometric scalar arithmetic. More... | |
class | DelayedUnaryIsometricArithmeticVectorHelper |
Helper for delayed unary isometric vector arithmetic. More... | |
class | DelayedUnaryIsometricAsinHelper |
Helper for delayed calculation of the inverse sine of each matrix entry. More... | |
class | DelayedUnaryIsometricAsinhHelper |
Helper for delayed calculation of the inverse hyperbolic sine of each matrix entry. More... | |
class | DelayedUnaryIsometricAtanHelper |
Helper for delayed calculation of the inverse tangent of each matrix entry. More... | |
class | DelayedUnaryIsometricAtanhHelper |
Helper for delayed calculation of the inverse hyperbolic tangent of each matrix entry. More... | |
class | DelayedUnaryIsometricBooleanCastHelper |
Delayed unary isometric boolean cast. More... | |
class | DelayedUnaryIsometricBooleanNotHelper |
Helper for a delayed unary isometric boolean NOT operation. More... | |
class | DelayedUnaryIsometricBooleanScalarHelper |
Helper for delayed unary isometric scalar boolean operations. More... | |
class | DelayedUnaryIsometricBooleanVectorHelper |
Helper for delayed unary isometric vector boolean operations. More... | |
class | DelayedUnaryIsometricCeilingHelper |
Helper for delayed calculation of the ceiling of each matrix entry. More... | |
class | DelayedUnaryIsometricCompareScalarHelper |
Helper for delayed scalar comparisons. More... | |
class | DelayedUnaryIsometricCompareVectorHelper |
Helper for delayed vector comparisons. More... | |
class | DelayedUnaryIsometricCosHelper |
Helper for delayed calculation of the cosine of a matrix entry. More... | |
class | DelayedUnaryIsometricCoshHelper |
Helper for delayed calculation of the hyperbolic cosine of each matrix entry. More... | |
class | DelayedUnaryIsometricExpHelper |
Helper for delayed calculation of the exponent function for each matrix entry. More... | |
class | DelayedUnaryIsometricExpm1Helper |
Helper for delayed calculation of the exponential function of each matrix entry minus 1. More... | |
class | DelayedUnaryIsometricFloorHelper |
Helper for delayed calculation of the floor of each matrix entry. More... | |
class | DelayedUnaryIsometricGammaHelper |
Apply the gamma function to a matrix entry. More... | |
class | DelayedUnaryIsometricLgammaHelper |
Apply the log-gamma function to a matrix entry. More... | |
class | DelayedUnaryIsometricLog1pHelper |
Helper for the delayed calculation of the logarithm of each matrix entry plus 1. More... | |
class | DelayedUnaryIsometricLogHelper |
Helper for delayed calculation of the logarithm of each matrix entry. More... | |
class | DelayedUnaryIsometricOperation |
Delayed isometric operation on a single matrix. More... | |
class | DelayedUnaryIsometricOperationHelper |
Helper operation interface for DelayedUnaryIsometricOperation . More... | |
class | DelayedUnaryIsometricRoundHelper |
Helper for delayed rounding of each matrix entry to the nearest integer. More... | |
class | DelayedUnaryIsometricSignHelper |
Helper for delayed calculation of the sign of each matrix entry. More... | |
class | DelayedUnaryIsometricSinHelper |
Helper for delayed calculation of the sine of each matrix entry. More... | |
class | DelayedUnaryIsometricSinhHelper |
Helper for delayed calculation of the hyperbolic sine of each matrix entry. More... | |
class | DelayedUnaryIsometricSpecialCompareHelper |
Delayed special value comparison. More... | |
class | DelayedUnaryIsometricSpecialSubstituteHelper |
Delayed special value substitution. More... | |
class | DelayedUnaryIsometricSqrtHelper |
Helper for delayed calculation of the square root of each matrix entry. More... | |
class | DelayedUnaryIsometricSubstituteScalarHelper |
Helper for delayed scalar substitution. More... | |
class | DelayedUnaryIsometricSubstituteVectorHelper |
Delayed vector comparisons. More... | |
class | DelayedUnaryIsometricTanHelper |
Helper for delayed calculation of the tangent of each matrix entry. More... | |
class | DelayedUnaryIsometricTanhHelper |
Helper for delayed calculation of the hyperbolic tangent of each matrix entry. More... | |
class | DelayedUnaryIsometricTruncHelper |
Helper for delayed truncation of each matrix entry to an integer. More... | |
class | DenseColumnMatrix |
Dense column-major matrix. More... | |
class | DenseMatrix |
Dense matrix representation. More... | |
class | DenseRowMatrix |
Dense row-major matrix. More... | |
struct | FillCompressedSparseContentsOptions |
Options for fill_compressed_sparse_contents() . More... | |
class | FixedVectorOracle |
Predict future accesses from a vector containing a fixed sequence. More... | |
class | FixedViewOracle |
Predict future accesses from a view on a fixed sequence. More... | |
class | FragmentedSparseColumnMatrix |
Fragmented sparse column matrix. More... | |
struct | FragmentedSparseContents |
Fragmented sparse contents. More... | |
class | FragmentedSparseMatrix |
Fragmented sparse matrix representation. More... | |
struct | FragmentedSparseMatrixOptions |
Options for FragmentedSparseMatrix() . More... | |
class | FragmentedSparseRowMatrix |
Fragmented sparse row matrix. More... | |
class | FullSparsifiedWrapper |
Wrap a full dense extractor in the sparse interface. More... | |
struct | has_data |
Compile time check for the data() method. More... | |
struct | has_data< T, V, decltype((void) std::declval< V >().data(), 0)> |
Compile time check for the data() method. More... | |
class | IndexSparsifiedWrapper |
Wrap an indexed dense extractor in the sparse interface. More... | |
class | Matrix |
Virtual class for a matrix. More... | |
class | MyopicDenseExtractor |
Extract an element of the target dimension in dense form without an oracle. More... | |
class | MyopicSparseExtractor |
Extract an element of the target dimension in sparse form without an oracle. More... | |
struct | Options |
Options for accessing data from a Matrix instance. More... | |
class | Oracle |
Predict future access requests on the target dimension. More... | |
class | OracularDenseExtractor |
Extract an element of the target dimension in dense form with an oracle. More... | |
class | OracularSparseExtractor |
Extract an element of the target dimension in sparse form with an oracle. More... | |
struct | PseudoOracularDenseExtractor |
Mimic the OracularDenseExtractor interface. More... | |
struct | PseudoOracularSparseExtractor |
Mimic the OracularSparseExtractor interface. More... | |
struct | RetrieveCompressedSparseContentsOptions |
Options for retrieve_compressed_sparse_contents() . More... | |
struct | RetrieveFragmentedSparseContentsOptions |
Options for retrieve_fragmented_sparse_contents() . More... | |
class | SomeNumericArray |
Array of some numeric type, determined at runtime. More... | |
struct | SparseRange |
A range of a sparse vector. More... | |
Typedefs | |
template<bool oracle_, typename Value_ , typename Index_ > | |
using | DenseExtractor = typename std::conditional<oracle_, OracularDenseExtractor<Value_, Index_>, MyopicDenseExtractor<Value_, Index_> >::type |
template<bool oracle_, typename Value_ , typename Index_ > | |
using | SparseExtractor = typename std::conditional<oracle_, OracularSparseExtractor<Value_, Index_>, MyopicSparseExtractor<Value_, Index_> >::type |
template<typename Index_ > | |
using | VectorPtr = std::shared_ptr<const std::vector<Index_> > |
using | NumericMatrix = Matrix<double, int> |
template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int> | |
using | DelayedBinaryIsometricAddHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::ADD, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int> | |
using | DelayedBinaryIsometricSubtractHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::SUBTRACT, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int> | |
using | DelayedBinaryIsometricMultiplyHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::MULTIPLY, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int> | |
using | DelayedBinaryIsometricDivideHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::DIVIDE, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int> | |
using | DelayedBinaryIsometricPowerHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::POWER, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int> | |
using | DelayedBinaryIsometricModuloHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::MODULO, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int> | |
using | DelayedBinaryIsometricIntegerDivideHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::INTEGER_DIVIDE, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricBooleanEqualHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricBooleanAndHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricBooleanOrHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricBooleanXorHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricGreaterThanHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricLessThanHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricGreaterThanOrEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricLessThanOrEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedBinaryIsometricNotEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricAddScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::ADD, true, OutputValue_, InputValue_, Index_, Scalar_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricSubtractScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::SUBTRACT, right_, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricMultiplyScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::MULTIPLY, true, OutputValue_, InputValue_, Index_, Scalar_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricDivideScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::DIVIDE, right_, OutputValue_, InputValue_, Index_, Scalar_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricPowerScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::POWER, right_, OutputValue_, InputValue_, Index_, Scalar_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricModuloScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::MODULO, right_, OutputValue_, InputValue_, Index_, Scalar_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricIntegerDivideScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::INTEGER_DIVIDE, right_, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricAddVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::ADD, true, OutputValue_, InputValue_, Index_, Vector_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricSubtractVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::SUBTRACT, right_, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricMultiplyVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::MULTIPLY, true, OutputValue_, InputValue_, Index_, Vector_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricDivideVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::DIVIDE, right_, OutputValue_, InputValue_, Index_, Vector_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricPowerVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::POWER, right_, OutputValue_, InputValue_, Index_, Vector_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricModuloVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::MODULO, right_, OutputValue_, InputValue_, Index_, Vector_> |
template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricIntegerDivideVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::INTEGER_DIVIDE, right_, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricBooleanEqualScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricBooleanAndScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricBooleanOrScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricBooleanXorScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricBooleanEqualVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricBooleanAndVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricBooleanOrVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricBooleanXorVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricGreaterThanScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricLessThanScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricGreaterThanOrEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricLessThanOrEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricNotEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricGreaterThanVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricLessThanVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricGreaterThanOrEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricLessThanOrEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ > | |
using | DelayedUnaryIsometricNotEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricIsnanHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISNAN, pass_, OutputValue_, InputValue_, Index_> |
template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricIsinfHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISINF, pass_, OutputValue_, InputValue_, Index_> |
template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricIsfiniteHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISFINITE, pass_, OutputValue_, InputValue_, Index_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricSubstituteEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricSubstituteGreaterThanScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricSubstituteLessThanScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricSubstituteGreaterThanOrEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricSubstituteLessThanOrEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ > | |
using | DelayedUnaryIsometricSubstituteNotEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ > | |
using | DelayedUnaryIsometricSubstituteEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ > | |
using | DelayedUnaryIsometricSubstituteGreaterThanVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ > | |
using | DelayedUnaryIsometricSubstituteLessThanVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ > | |
using | DelayedUnaryIsometricSubstituteGreaterThanOrEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ > | |
using | DelayedUnaryIsometricSubstituteLessThanOrEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ > | |
using | DelayedUnaryIsometricSubstituteNotEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricSubstituteIsnanHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISNAN, pass_, OutputValue_, InputValue_, Index_> |
template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricSubstituteIsinfHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISINF, pass_, OutputValue_, InputValue_, Index_> |
template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ > | |
using | DelayedUnaryIsometricSubstituteIsfiniteHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISFINITE, pass_, OutputValue_, InputValue_, Index_> |
template<class Array_ > | |
using | ElementType = typename std::remove_cv<typename std::remove_reference<decltype(std::declval<Array_>()[0])>::type>::type |
template<bool oracle_, typename Index_ > | |
using | MaybeOracle = typename std::conditional<oracle_, std::shared_ptr<const Oracle<Index_> >, bool>::type |
Enumerations | |
enum class | DimensionSelectionType : char { FULL , BLOCK , INDEX } |
enum class | ArithmeticOperation : char { ADD , SUBTRACT , MULTIPLY , DIVIDE , POWER , MODULO , INTEGER_DIVIDE } |
enum class | BooleanOperation : char { AND , OR , XOR , EQUAL } |
enum class | CompareOperation : char { EQUAL , GREATER_THAN , LESS_THAN , GREATER_THAN_OR_EQUAL , LESS_THAN_OR_EQUAL , NOT_EQUAL } |
enum class | SpecialCompareOperation : char { ISNAN , ISINF , ISFINITE } |
enum | SomeNumericType { I8 , U8 , I16 , U16 , I32 , U32 , I64 , U64 , F32 , F64 } |
Functions | |
template<typename StoredValue_ , typename InputValue_ , typename InputIndex_ > | |
void | convert_to_dense (const Matrix< InputValue_, InputIndex_ > &matrix, bool row_major, StoredValue_ *store, const ConvertToDenseOptions &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Value_, typename InputValue_ , typename InputIndex_ > | |
std::shared_ptr< Matrix< Value_, Index_ > > | convert_to_dense (const Matrix< InputValue_, InputIndex_ > &matrix, bool row_major, const ConvertToDenseOptions &options) |
template<typename Input_ , typename Output_ > | |
void | transpose (const Input_ *input, size_t nrow, size_t ncol, size_t input_stride, Output_ *output, size_t output_stride) |
template<typename Input_ , typename Output_ > | |
void | transpose (const Input_ *input, size_t nrow, size_t ncol, Output_ *output) |
template<typename ValueOut_ , typename IndexOut_ , typename ValueIn_ , typename IndexIn_ > | |
std::shared_ptr< Matrix< ValueOut_, IndexOut_ > > | make_DelayedCast (std::shared_ptr< const Matrix< ValueIn_, IndexIn_ > > p) |
template<class Values_ , class RowIndices_ , class ColumnIndices_ > | |
std::vector< size_t > | compress_sparse_triplets (size_t nrow, size_t ncol, Values_ &values, RowIndices_ &row_indices, ColumnIndices_ &column_indices, bool csr) |
template<typename Value_ , typename Index_ , typename Count_ > | |
void | count_compressed_sparse_non_zeros (const tatami::Matrix< Value_, Index_ > &matrix, bool row, Count_ *output, const CountCompressedSparseNonZerosOptions &options) |
template<typename InputValue_ , typename InputIndex_ , typename Pointer_ , typename StoredValue_ , typename StoredIndex_ > | |
void | fill_compressed_sparse_contents (const tatami::Matrix< InputValue_, InputIndex_ > &matrix, bool row, const Pointer_ *pointers, StoredValue_ *output_value, StoredIndex_ *output_index, const FillCompressedSparseContentsOptions &options) |
template<typename StoredValue_ , typename StoredIndex_ , typename StoredPointer_ = size_t, typename InputValue_ , typename InputIndex_ > | |
CompressedSparseContents< StoredValue_, StoredIndex_, StoredPointer_ > | retrieve_compressed_sparse_contents (const Matrix< InputValue_, InputIndex_ > &matrix, bool row, const RetrieveCompressedSparseContentsOptions &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Value_, typename StoredIndex_ = Index_, typename StoredPointer_ = size_t, typename InputValue_ , typename InputIndex_ > | |
std::shared_ptr< Matrix< Value_, Index_ > > | convert_to_compressed_sparse (const Matrix< InputValue_, InputIndex_ > &matrix, bool row, const ConvertToCompressedSparseOptions &options) |
template<typename StoredValue_ , typename StoredIndex_ , typename InputValue_ , typename InputIndex_ > | |
FragmentedSparseContents< StoredValue_, StoredIndex_ > | retrieve_fragmented_sparse_contents (const Matrix< InputValue_, InputIndex_ > &matrix, bool row, const RetrieveFragmentedSparseContentsOptions &options) |
template<typename Value_ , typename Index_ , typename StoredValue_ = Value_, typename StoredIndex_ = Index_, typename InputValue_ , typename InputIndex_ > | |
std::shared_ptr< Matrix< Value_, Index_ > > | convert_to_fragmented_sparse (const Matrix< InputValue_, InputIndex_ > &matrix, bool row, const ConvertToFragmentedSparseOptions &options) |
template<typename Value_ , typename Index_ > | |
std::shared_ptr< Matrix< Value_, Index_ > > | make_DelayedSubsetBlock (std::shared_ptr< const Matrix< Value_, Index_ > > matrix, Index_ subset_start, Index_ subset_length, bool by_row) |
template<typename Value_ , typename Index_ , class SubsetStorage_ > | |
std::shared_ptr< Matrix< Value_, Index_ > > | make_DelayedSubset (std::shared_ptr< const Matrix< Value_, Index_ > > matrix, SubsetStorage_ subset, bool by_row) |
template<bool sparse_, typename Value_ , typename Index_ , typename ... Args_> | |
auto | consecutive_extractor (const Matrix< Value_, Index_ > &matrix, bool row, Index_ iter_start, Index_ iter_length, Args_ &&... args) |
template<typename Value_ , typename Size_ > | |
Value_ * | copy_n (const Value_ *input, Size_ n, Value_ *output) |
template<bool sparse_, bool oracle_, typename Value_ , typename Index_ , typename ... Args_> | |
auto | new_extractor (const Matrix< Value_, Index_ > &matrix, bool row, MaybeOracle< oracle_, Index_ > oracle, Args_ &&... args) |
template<bool parallel_ = true, class Function_ , typename Index_ > | |
void | parallelize (Function_ fun, Index_ tasks, int threads) |
template<typename Index_ , class Function_ > | |
void | process_consecutive_indices (const Index_ *indices, Index_ length, Function_ fun) |
template<typename Value_ , typename Index_ > | |
std::shared_ptr< const Matrix< Value_, Index_ > > | wrap_shared_ptr (const Matrix< Value_, Index_ > *ptr) |
Flexible representations for matrix data.
using tatami::DenseExtractor = typename std::conditional<oracle_, OracularDenseExtractor<Value_, Index_>, MyopicDenseExtractor<Value_, Index_> >::type |
oracle_ | Whether to use an oracle-aware interface. |
Value_ | Data value type, should be numeric. |
Index_ | Row/column index type, should be integer. |
Type alias that switches between OracularDenseExtractor
and MyopicDenseExtractor
depending on oracle_
. Intended for templated class definitions, where setting oracle_
can define subclasses for both interfaces.
using tatami::SparseExtractor = typename std::conditional<oracle_, OracularSparseExtractor<Value_, Index_>, MyopicSparseExtractor<Value_, Index_> >::type |
oracle_ | Whether to use an oracle-aware interface. |
Value_ | Data value type, should be numeric. |
Index_ | Row/column index type, should be integer. |
Type alias that switches between OracularSparseExtractor
and MyopicSparseExtractor
depending on oracle_
. Intended for templated class definitions, where setting oracle_
can define subclasses for both interfaces.
using tatami::VectorPtr = std::shared_ptr<const std::vector<Index_> > |
Index | Row/column index type, should be integer. |
Pointer to a vector, typically containing unique and sorted indices. We use a shared pointer so that we can cheaply re-use the same sequence of indices for multiple Matrix
objects.
using tatami::NumericMatrix = Matrix<double, int> |
A convenient shorthand for the most common use case of double-precision matrices.
using tatami::DelayedBinaryIsometricAddHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::ADD, OutputValue_, InputValue_, Index_> |
Convenient alias for the addition helper.
OutputValue_ | Type of the result of the addition. |
InputValue_ | Type of the matrix value used in the addition. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricSubtractHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::SUBTRACT, OutputValue_, InputValue_, Index_> |
Convenient alias for the subtraction helper.
OutputValue_ | Type of the result of the subtraction. |
InputValue_ | Type of the matrix value used in the subtraction. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricMultiplyHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::MULTIPLY, OutputValue_, InputValue_, Index_> |
Convenient alias for the multiplication helper.
OutputValue_ | Type of the result of the multiplication. |
InputValue_ | Type of the matrix value used in the multiplication. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricDivideHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::DIVIDE, OutputValue_, InputValue_, Index_> |
Convenient alias for the division helper.
OutputValue_ | Type of the result of the division. |
InputValue_ | Type of the matrix value used in the division. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricPowerHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::POWER, OutputValue_, InputValue_, Index_> |
Convenient alias for the power operation helper.
OutputValue_ | Type of the result of the power operation. |
InputValue_ | Type of the matrix value used in the power operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricModuloHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::MODULO, OutputValue_, InputValue_, Index_> |
Convenient alias for the modulo operation helper.
OutputValue_ | Type of the result of the modulo operation. |
InputValue_ | Type of the matrix value used in the modulo operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricIntegerDivideHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::INTEGER_DIVIDE, OutputValue_, InputValue_, Index_> |
Convenient alias for the integer division helper.
OutputValue_ | Type of the result of the integer division. |
InputValue_ | Type of the matrix value used in the integer division. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricBooleanEqualHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean equality helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricBooleanAndHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean AND helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricBooleanOrHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean OR helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricBooleanXorHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean XOR helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_> |
Convenient alias for the equality comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricGreaterThanHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_> |
Convenient alias for the "greater than" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricLessThanHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_> |
Convenient alias for the "less than" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricGreaterThanOrEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_> |
Convenient alias for the "greater than or equal" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricLessThanOrEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_> |
Convenient alias for the "less than or equal" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedBinaryIsometricNotEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_> |
Convenient alias for the non-equality comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricAddScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::ADD, true, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar addition helper.
OutputValue_ | Type of the result of the addition. |
InputValue_ | Type of the matrix value used in the addition. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricSubtractScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::SUBTRACT, right_, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar subtraction helper.
right_ | Whether the scalar should be on the right hand side. |
OutputValue_ | Type of the result of the subtraction. |
InputValue_ | Type of the matrix value used in the subtraction. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricMultiplyScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::MULTIPLY, true, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar multiplication helper.
OutputValue_ | Type of the result of the multiplication. |
InputValue_ | Type of the matrix value used in the multiplication. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricDivideScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::DIVIDE, right_, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar division helper.
right_ | Whether the scalar should be on the right hand side. |
OutputValue_ | Type of the result of the division. |
InputValue_ | Type of the matrix value used in the division. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricPowerScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::POWER, right_, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar power helper.
right_ | Whether the scalar should be on the right hand side. |
OutputValue_ | Type of the result of the power operation. |
InputValue_ | Type of the matrix value used in the power operation. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricModuloScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::MODULO, right_, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar modulo helper.
right_ | Whether the scalar should be on the right hand side. |
OutputValue_ | Type of the result of the modulo operation. |
InputValue_ | Type of the matrix value used in the modulo operation. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricIntegerDivideScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::INTEGER_DIVIDE, right_, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar modulo helper.
right_ | Whether the scalar should be on the right hand side. |
OutputValue_ | Type of the result of the modulo operation. |
InputValue_ | Type of the matrix value used in the modulo operation. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricAddVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::ADD, true, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector addition helper.
OutputValue_ | Type of the result of the addition. |
InputValue_ | Type of the matrix value used in the addition. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricSubtractVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::SUBTRACT, right_, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector subtraction helper.
right_ | Whether the vector should be on the right hand side. |
OutputValue_ | Type of the result of the subtraction. |
InputValue_ | Type of the matrix value used in the subtraction. |
Index_ | Type of index. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricMultiplyVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::MULTIPLY, true, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector multiplication helper.
OutputValue_ | Type of the result of the multiplication. |
InputValue_ | Type of the matrix value used in the multiplication. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricDivideVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::DIVIDE, right_, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector division helper.
right_ | Whether the vector should be on the right hand side. |
OutputValue_ | Type of the result of the division. |
InputValue_ | Type of the matrix value used in the division. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricPowerVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::POWER, right_, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector power helper.
right_ | Whether the vector should be on the right hand side. |
OutputValue_ | Type of the result of the power operation. |
InputValue_ | Type of the matrix value used in the power operation. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricModuloVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::MODULO, right_, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector modulo helper.
right_ | Whether the vector should be on the right hand side. |
OutputValue_ | Type of the result of the modulo operation. |
InputValue_ | Type of the matrix value used in the modulo operation. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricIntegerDivideVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::INTEGER_DIVIDE, right_, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector modulo helper.
right_ | Whether the vector should be on the right hand side. |
OutputValue_ | Type of the result of the modulo operation. |
InputValue_ | Type of the matrix value used in the modulo operation. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricBooleanEqualScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean equality scalar helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricBooleanAndScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean AND scalar helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricBooleanOrScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean OR scalar helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricBooleanXorScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_> |
Convenient alias for the boolean XOR scalar helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricBooleanEqualVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the boolean equality vector helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricBooleanAndVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the boolean AND vector helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricBooleanOrVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the boolean OR vector helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricBooleanXorVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the boolean XOR vector helper.
OutputValue_ | Type of the result of the boolean operation. |
InputValue_ | Type of the matrix value used in the boolean operation. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar equality comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricGreaterThanScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "greater than" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricLessThanScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "less than" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricGreaterThanOrEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "greater than or equal" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricLessThanOrEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "less than or equal" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricNotEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar non-equality comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector equality comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricGreaterThanVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector "greater than" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricLessThanVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector "less than" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricGreaterThanOrEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector "greater than or equal" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricLessThanOrEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector "less than or equal" comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricNotEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Vector_> |
Convenient alias for the vector non-equality comparison helper.
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
Vector_ | Type of the vector. |
using tatami::DelayedUnaryIsometricIsnanHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISNAN, pass_, OutputValue_, InputValue_, Index_> |
Convenient alias for the "comparison to NaN" helper.
pass_ | Whether to return true if the input value is NaN. |
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricIsinfHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISINF, pass_, OutputValue_, InputValue_, Index_> |
Convenient alias for the "comparison to infinity" helper.
pass_ | Whether to return true if the input value is infinite. |
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricIsfiniteHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISFINITE, pass_, OutputValue_, InputValue_, Index_> |
Convenient alias for the "is finite" helper.
pass_ | Whether to return true if the input value is finite. |
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricSubstituteEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar equality substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricSubstituteGreaterThanScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "greater than" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricSubstituteLessThanScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "less than" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricSubstituteGreaterThanOrEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "greater than or equal" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricSubstituteLessThanOrEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar "less than or equal" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricSubstituteNotEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Scalar_> |
Convenient alias for the scalar non-equality substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
Scalar_ | Type of the scalar value. |
using tatami::DelayedUnaryIsometricSubstituteEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
Convenient alias for the scalar equality substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
ComparedVector_ | Type of the vector containing values to compare to the input matrix. |
SubstituteVector_ | Type of the vector containing values to substitute in the output matrix. |
using tatami::DelayedUnaryIsometricSubstituteGreaterThanVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
Convenient alias for the scalar "greater than" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
ComparedVector_ | Type of the vector containing values to compare to the input matrix. |
SubstituteVector_ | Type of the vector containing values to substitute in the output matrix. |
using tatami::DelayedUnaryIsometricSubstituteLessThanVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
Convenient alias for the scalar "less than" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
ComparedVector_ | Type of the vector containing values to compare to the input matrix. |
SubstituteVector_ | Type of the vector containing values to substitute in the output matrix. |
using tatami::DelayedUnaryIsometricSubstituteGreaterThanOrEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
Convenient alias for the scalar "greater than or equal" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
ComparedVector_ | Type of the vector containing values to compare to the input matrix. |
SubstituteVector_ | Type of the vector containing values to substitute in the output matrix. |
using tatami::DelayedUnaryIsometricSubstituteLessThanOrEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
Convenient alias for the scalar "less than or equal" substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
ComparedVector_ | Type of the vector containing values to compare to the input matrix. |
SubstituteVector_ | Type of the vector containing values to substitute in the output matrix. |
using tatami::DelayedUnaryIsometricSubstituteNotEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_> |
Convenient alias for the scalar non-equality substitution helper.
OutputValue_ | Type of the result of the substitution. |
InputValue_ | Type of the matrix value used in the substitution. |
Index_ | Integer type for the row/column indices. |
ComparedVector_ | Type of the vector containing values to compare to the input matrix. |
SubstituteVector_ | Type of the vector containing values to substitute in the output matrix. |
using tatami::DelayedUnaryIsometricSubstituteIsnanHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISNAN, pass_, OutputValue_, InputValue_, Index_> |
Convenient alias for the NaN substitution helper.
pass_ | Whether to substitute if the input value is NaN. |
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricSubstituteIsinfHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISINF, pass_, OutputValue_, InputValue_, Index_> |
Convenient alias for the infinity substitution helper.
pass_ | Whether to substitute if the input value is infinite. |
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::DelayedUnaryIsometricSubstituteIsfiniteHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISFINITE, pass_, OutputValue_, InputValue_, Index_> |
Convenient alias for the finite value substitution helper.
pass_ | Whether to substitute if the input value is finite. |
OutputValue_ | Type of the result of the comparison. |
InputValue_ | Type of the matrix value used in the comparison. |
Index_ | Integer type for the row/column indices. |
using tatami::ElementType = typename std::remove_cv<typename std::remove_reference<decltype(std::declval<Array_>()[0])>::type>::type |
Array_ | Some array of values that are accessed with [ . |
Extract the type of array elements, after stripping away references and const
-ness.
using tatami::MaybeOracle = typename std::conditional<oracle_, std::shared_ptr<const Oracle<Index_> >, bool>::type |
oracle_ | Whether an oracle should be supplied. |
Index_ | Row/column index type, should be integer. |
Maybe an Oracle
, maybe a placeholder boolean, depending on oracle_
.
|
strong |
Selection of dimension elements:
FULL
: selects the full extent of the dimension, i.e., all elements.BLOCK
: selects a contiguous block of elements in the dimension.INDEX
: selects a sorted and unique array of indices of dimension elements.This corresponds to the various overloads of Matrix
methods (e.g., Matrix::dense_row()
), each of which extracts a different selection of elements from the non-target dimension.
|
strong |
Type of arithmetic operation.
The INTEGER_DIVIDE
refers to a floored division, which differs from truncation for negative quotients. This choice is based on R's %/%
, which in turn is based on a recommendation by Donald Knuth.
Similarly, x MODULO y
is defined as x - floor(x / y)
, based on the same floored division. Note that this differs from the built-in %
operator, which performs truncation.
|
strong |
Type of boolean operation.
|
strong |
Type of comparison operation.
|
strong |
Type of comparison operation for special IEEE values.
Types supported in SomeNumericArray
. The letters indicate whether it is an integer (I), unsigned integer (U) or a float, while the numbers specify the number of bits for the type. So, for example, U16
is an unsigned 16-bit integer, while F64
is a double
.
void tatami::convert_to_dense | ( | const Matrix< InputValue_, InputIndex_ > & | matrix, |
bool | row_major, | ||
StoredValue_ * | store, | ||
const ConvertToDenseOptions & | options ) |
StoredValue_ | Type of data values to be stored in the output. |
InputValue_ | Type of data values in the input. |
InputIndex_ | Integer type for the indices in the input. |
matrix | A tatami::Matrix . | |
row_major | Whether to store the output as a row-major matrix. | |
[out] | store | Pointer to an array of length equal to the product of the dimensions of matrix . On output, this is filled with values from matrix in row- or column-major format depending on row_major . |
options | Further options. |
|
inline |
Value_ | Type of data values in the output interface. |
Index_ | Integer type for the indices in the output interface. |
StoredValue_ | Type of data values to be stored in the output. |
InputValue_ | Type of data values in the input. |
InputIndex_ | Integer type for the indices in the input. |
matrix | A tatami::Matrix . |
row_major | Whether to return a row-major matrix. |
options | Further options. |
tatami::DenseMatrix
with the same dimensions and type as the matrix referenced by matrix
. If row_major = true
, the matrix is row-major, otherwise it is column-major. void tatami::transpose | ( | const Input_ * | input, |
size_t | nrow, | ||
size_t | ncol, | ||
size_t | input_stride, | ||
Output_ * | output, | ||
size_t | output_stride ) |
Input_ | Input type. |
Output_ | Output type. |
[in] | input | Pointer to an array containing a row-major matrix with nrow rows and ncol columns. Elements within each row should be contiguous but consecutive rows can be separated by a constant stride, see input_stride . The array should have at least (nrow - 1) * input_stride + ncol addressable elements. |
nrow | Number of rows in the matrix stored at input . | |
ncol | Number of columns in the matrix stored at input . | |
input_stride | Distance between corresponding entries on consecutive rows of the input matrix. This should be greater than or equal to ncol . | |
[out] | output | Pointer to an array in which to store the transpose of the matrix in input . On output, this stores a row-major matrix with ncol rows and nrow columns. Elements within each row should be contiguous but consecutive rows can be separated by a constant stride, see output_stride . The array should have at least (ncol - 1) * output_stride + nrow addressable elements. It is assumed that output does not alias input . |
output_stride | Distance between corresponding entries on consecutive rows of the output matrix. This should be greater than or equal to nrow . |
This function is intended for developers of Matrix
subclasses who need to do some transposition, e.g., for dense chunks during caching. The *_stride
arguments allow input
and output
to refer to submatrices of larger arrays.
The argument descriptions refer to row-major matrices only for the sake of convenience. This function is equally applicable to column-major matrices, just replace all instances of "row" with "column" and vice versa.
void tatami::transpose | ( | const Input_ * | input, |
size_t | nrow, | ||
size_t | ncol, | ||
Output_ * | output ) |
Input_ | Input type. |
Output_ | Output type. |
[in] | input | Pointer to an array containing a row-major matrix with nrow rows and ncol columns. The array should have at least nrow * ncol addressable elements, and all elements should be stored contiguously in the array. |
nrow | Number of rows in the matrix stored at input . | |
ncol | Number of columns in the matrix stored at input . | |
[out] | output | Pointer to an array of length nrow * ncol . On output, this will hold the transpose of the matrix represented by input , i.e., a row-major matrix with ncol rows and nrow columns. It is assumed that output does not alias input . |
This function is intended for developers of Matrix
subclasses who need to do some transposition, e.g., for dense chunks during caching. Users should instead construct a DelayedTranspose
object to perform a memory-efficient delayed transposition, or use convert_to_dense()
to convert their dense data into the desired storage layout.
The argument descriptions refer to row-major matrices only for the sake of convenience. This function is equally applicable to column-major matrices, just replace all instances of "row" with "column" and vice versa.
std::shared_ptr< Matrix< ValueOut_, IndexOut_ > > tatami::make_DelayedCast | ( | std::shared_ptr< const Matrix< ValueIn_, IndexIn_ > > | p | ) |
Recast a Matrix
to a different interface type.
ValueOut_ | Data type to cast to. |
IndexOut_ | Index type to cast to. |
ValueIn_ | Data type to cast from. |
IndexIn_ | Index type to cast from. |
p | Pointer to the (possbly const ) Matrix instance to cast from. |
Matrix
instance of the desired interface type. std::vector< size_t > tatami::compress_sparse_triplets | ( | size_t | nrow, |
size_t | ncol, | ||
Values_ & | values, | ||
RowIndices_ & | row_indices, | ||
ColumnIndices_ & | column_indices, | ||
bool | csr ) |
Values_ | Random-access container for the values. |
RowIndices_ | Random access container for the row indices. |
ColumnIndices_ | Random access container for the column indices. |
nrow | Number of rows. |
ncol | Number of columns. |
row_indices | Row indices of the structural non-zeros. Values must be non-negative integers less than nrow . |
column_indices | Column indices of the structural non-zeros. This must be of the same length as row_indices , where corresponding entries contain data for a single structural non-zero. Values must be non-negative integers less than ncol . |
values | Values of the structural non-zeros. This must be of the same length as row_indices and column_indices , where corresponding entries contain data for a single structural non-zero. |
csr | Whether to create a compressed sparse row format. If false , the compressed sparse column format is used instead. |
row_indices
, column_indices
and values
are sorted in-place by the row and column indices (if csr = true
) or by the column and row indices (if csr = false
). A vector of index pointers is returned with length nrow + 1
(if csr = true
) or ncol + 1
(if csr = false
). void tatami::count_compressed_sparse_non_zeros | ( | const tatami::Matrix< Value_, Index_ > & | matrix, |
bool | row, | ||
Count_ * | output, | ||
const CountCompressedSparseNonZerosOptions & | options ) |
Value_ | Type of value in the matrix. |
Index_ | Integer type of row/column index. |
Count_ | Integer type for the non-zero count. |
matrix | A tatami::Matrix . | |
row | Whether to count structural non-zeros by row. | |
[out] | output | Pointer to an array of length equal to the number of rows (if row = true ) or columns (otherwise) of matrix . On output, this stores the number of structural non-zeros in each row (if row = true ) or column (otherwise). |
options | Further options. |
For sparse matrix
, all structural non-zero elements are reported, even if they have actual values of zero. In contrast, for dense matrix
, only the non-zero values are counted; these are considered to be structural non-zeros upon conversion to a sparse matrix (e.g., in fill_compressed_sparse_contents()
).
void tatami::fill_compressed_sparse_contents | ( | const tatami::Matrix< InputValue_, InputIndex_ > & | matrix, |
bool | row, | ||
const Pointer_ * | pointers, | ||
StoredValue_ * | output_value, | ||
StoredIndex_ * | output_index, | ||
const FillCompressedSparseContentsOptions & | options ) |
StoredValue_ | Type of data values to be stored in the output. |
StoredIndex_ | Integer type for storing the indices in the output. |
Pointer_ | Integer type for the row/column pointers. |
InputValue_ | Type of data values in the input interface. |
InputIndex_ | Integer type for indices in the input interface. |
matrix | A tatami::Matrix . | |
row | Whether to fill output_value and output_index by row, i.e., the output represents a compressed sparse row matrix. | |
[in] | pointers | Pointer to an array of length greater than or equal to the number of rows (if row = true ) or columns (otherwise) of matrix . Each entry contains the position of the start of each row/column in output_value and output_index . This argument is equivalent to the array of pointers for the compressed sparse format (e.g., CompressedSparseContents::pointers ), and can be obtained by taking the cumulative sum of the per-row/column counts from count_compressed_sparse_non_zeros() . |
[out] | output_value | Pointer to an array of length equal to the total number of structural non-zero elements. On output, this is used to store the values of those elements in a compressed sparse format (e.g., CompressedSparseContents::value ). |
[out] | output_index | Pointer to an array of length equal to the total number of structural non-zero elements. On output, this is used to store the row/column indices of those elements in a compressed sparse format (e.g., CompressedSparseContents::index ). |
options | Further options. |
CompressedSparseContents< StoredValue_, StoredIndex_, StoredPointer_ > tatami::retrieve_compressed_sparse_contents | ( | const Matrix< InputValue_, InputIndex_ > & | matrix, |
bool | row, | ||
const RetrieveCompressedSparseContentsOptions & | options ) |
StoredValue_ | Type of data values to be stored in the output. |
StoredIndex_ | Integer type for storing the row/column indices in the output. |
StoredPointer_ | Integer type for the row/column pointers in the output. This should be large enough to hold the number of non-zero elements in matrix . |
InputValue_ | Type of data values in the input interface. |
InputIndex_ | Integer type for indices in the input interface. |
matrix | A tatami::Matrix . |
row | Whether to retrieve the contents of matrix by row, i.e., the output is a compressed sparse row matrix. |
options | Further options. |
CompressedSparseContents
.The behavior of this function can be replicated by manually calling count_compressed_sparse_non_zeros()
followed by fill_compressed_sparse_contents()
. This may be desirable for users who want to put the compressed sparse contents into pre-existing memory allocations.
std::shared_ptr< Matrix< Value_, Index_ > > tatami::convert_to_compressed_sparse | ( | const Matrix< InputValue_, InputIndex_ > & | matrix, |
bool | row, | ||
const ConvertToCompressedSparseOptions & | options ) |
Value_ | Type of data values in the output interface. |
Index_ | Integer type for the indices in the output interface. |
StoredValue_ | Type of data values to be stored in the output. |
StoredIndex_ | Integer type for storing the indices in the output. |
StoredPointer_ | Integer type for the row/column pointers in the output. This should be large enough to hold the number of non-zero elements in matrix . |
InputValue_ | Type of data values in the input interface. |
InputIndex_ | Integer type for indices in the input interface. |
matrix | A tatami::Matrix . |
row | Whether to return a compressed sparse row matrix. |
options | Further options. |
tatami::CompressedSparseMatrix
, with the same dimensions and type as the matrix referenced by matrix
. If row = true
, the matrix is in compressed sparse row format, otherwise it is compressed sparse column. FragmentedSparseContents< StoredValue_, StoredIndex_ > tatami::retrieve_fragmented_sparse_contents | ( | const Matrix< InputValue_, InputIndex_ > & | matrix, |
bool | row, | ||
const RetrieveFragmentedSparseContentsOptions & | options ) |
StoredValue_ | Type of data values to be stored in the output. |
StoredIndex_ | Integer type for storing the indices in the output. |
InputValue_ | Type of data values in the input interface. |
InputIndex_ | Integer type for indices in the input interface. |
matrix | Pointer to a tatami::Matrix . |
row | Whether to retrieve the contents of matrix by row, i.e., the output is a fragmented sparse row matrix. |
options | Further options. |
FragmentedSparseContents
. std::shared_ptr< Matrix< Value_, Index_ > > tatami::convert_to_fragmented_sparse | ( | const Matrix< InputValue_, InputIndex_ > & | matrix, |
bool | row, | ||
const ConvertToFragmentedSparseOptions & | options ) |
Value_ | Type of data values in the output interface. |
Index_ | Integer type for the indices in the output interface. |
StoredValue_ | Type of data values to be stored in the output. |
StoredIndex_ | Integer type for storing the indices in the output. |
InputValue_ | Type of data values in the input interface. |
InputIndex_ | Integer type for indices in the input interface. |
matrix | A tatami::Matrix . |
row | Whether to return a fragmented sparse row matrix. |
options | Further options. |
tatami::FragmentedSparseMatrix
, with the same dimensions and type as the matrix referenced by matrix
. If row = true
, the matrix is in fragmented sparse row format, otherwise it is fragmented sparse column. std::shared_ptr< Matrix< Value_, Index_ > > tatami::make_DelayedSubsetBlock | ( | std::shared_ptr< const Matrix< Value_, Index_ > > | matrix, |
Index_ | subset_start, | ||
Index_ | subset_length, | ||
bool | by_row ) |
A make_*
helper function to enable partial template deduction of supplied types.
Value_ | Type of matrix value. |
Index_ | Integer type for the row/column indices. |
matrix | Pointer to the underlying (pre-subset) Matrix . |
subset_start | Index of the start of the block. This should be a row index if by_row = true and a column index otherwise. |
subset_length | Index of the one-past-the-end of the block. |
by_row | Whether to apply the subset to the rows. If false, the subset is applied to the columns. |
DelayedSubsetBlock
instance. std::shared_ptr< Matrix< Value_, Index_ > > tatami::make_DelayedSubset | ( | std::shared_ptr< const Matrix< Value_, Index_ > > | matrix, |
SubsetStorage_ | subset, | ||
bool | by_row ) |
A make_*
helper function to enable partial template deduction of supplied types. This will automatically dispatch to DelayedSubsetSortedUnique
, DelayedSubsetUnique
, DelayedSubsetSorted
or DelayedSubset
, depending on the values in subset
.
Value_ | Type of matrix value. |
Index_ | Integer type of the row/column indices. |
SubsetStorage_ | Vector containing the subset indices, to be automatically deduced. Any class implementing [ , size() , begin() and end() can be used here. |
matrix | Pointer to a (possibly const ) Matrix . |
subset | Instance of the subset index vector. |
by_row | Whether to apply the subset to the rows. If false, the subset is applied to the columns. |
DelayedSubset
instance. auto tatami::consecutive_extractor | ( | const Matrix< Value_, Index_ > & | matrix, |
bool | row, | ||
Index_ | iter_start, | ||
Index_ | iter_length, | ||
Args_ &&... | args ) |
This function creates an extractor object with a ConsecutiveOracle
instance spanning a range of rows or columns. Matrix
implementations that are oracle-aware can then perform pre-fetching of future accesses for greater performance.
sparse_ | Whether to perform sparse retrieval. |
Value_ | Type of the matrix value. |
Index_ | Type of the row/column index. |
Args_ | Types of further arguments to pass to Matrix::dense_row or Matrix::dense_column . |
matrix | A tatami::Matrix to iterate over. |
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. |
iter_start | Index of the first row (if row = true ) or column (otherwise) of the iteration range. |
iter_length | Number of rows (if row = true ) or columns (otherwise) in the iteration range. |
args | Further arguments to pass to new_extractor() . |
[iter_start, iter_start + iter_length)
. This may be either an OracularDenseExtractor
or OracularSparseExtractor
depending on sparse_
. Value_ * tatami::copy_n | ( | const Value_ * | input, |
Size_ | n, | ||
Value_ * | output ) |
Value_ | Type of value being copied. |
Size_ | Type for the array length. |
[in] | input | Pointer to a source array of size n . |
n | Length of the array. | |
[out] | output | Pointer to a destination array of size n . |
input
to output
, and output
is returned. This is a no-op if input == output
. auto tatami::new_extractor | ( | const Matrix< Value_, Index_ > & | matrix, |
bool | row, | ||
MaybeOracle< oracle_, Index_ > | oracle, | ||
Args_ &&... | args ) |
This utility makes it easier for developers to write a single templated function that works with and without oracles. A boolean placeholder should be provided as the "oracle" in the myopic extractor case.
sparse_ | Whether to perform sparse retrieval. |
oracle_ | Whether an oracle should be supplied. |
Value_ | Data value type, should be numeric. |
Index_ | Row/column index type, should be integer. |
Args_ | Further arguments. |
[in] | matrix | A tatami::Matrix object to iterate over. |
row | Whether to create a row-wise extractor, i.e., the rows are the target dimension. | |
oracle | Pointer to an oracle if oracle_ = true , otherwise a placeholder boolean that is ignored. | |
args | Zero or more additional arguments to pass to methods like Matrix::dense_row() . |
ptr
. This may be any of MyopicDenseExtractor
, MyopicSparseExtractor
, OracularDenseExtractor
or OracularSparseExtractor
, depending on sparse_
and oracle_
. void tatami::parallelize | ( | Function_ | fun, |
Index_ | tasks, | ||
int | threads ) |
Apply a function to a set of tasks in parallel, usually for iterating over a dimension of a Matrix
. By default, this uses subpar::parallelize_range()
internally, which uses OpenMP if available and <thread>
otherwise. Advanced users can override the default parallelization mechanism by defining a TATAMI_CUSTOM_PARALLEL
function-like macro. The macro should accept the fun
, tasks
and threads
arguments as described below.
parallel_ | Whether the tasks should be run in parallel. If false , no parallelization is performed and all tasks are run on the current thread. |
Function_ | Function to be applied for a contiguous range of tasks. This should accept three arguments:
|
Index_ | Integer type for the number of tasks. |
fun | Function that executes a contiguous range of tasks. |
tasks | Number of tasks. |
threads | Number of threads. |
void tatami::process_consecutive_indices | ( | const Index_ * | indices, |
Index_ | length, | ||
Function_ | fun ) |
Process runs of consecutive indices that are used in the index-aware dense_row()
, sparse_column()
, etc. methods. This provides some opportunities for optimization when the indices contain contiguous stretches. For example, third-party libraries can be asked to process blocks of observations rather than handling them one at a time.
Index_ | Integer type for the row/column indices. |
Function_ | Function to apply to each contiguous run. |
indices | Pointer to an array of sorted and unique indices for row/column elements. |
length | Length of the array pointed to by indices . |
fun | Function to apply to each contiguous run of indices. This should take two arguments - the start index of each run, and the length of the run. Calls to fun are guaranteed to contain increasing start indices with non-overlapping runs. The return value of this function is ignored. |
std::shared_ptr< const Matrix< Value_, Index_ > > tatami::wrap_shared_ptr | ( | const Matrix< Value_, Index_ > * | ptr | ) |
Wrap a raw pointer inside a shared_ptr
, typically to enable use of a raw tatami::Matrix
pointer with delayed operation wrappers. This enables use of delayed operations inside functions that accept a raw pointer to an externally owned tatami::Matrix
.
Value_ | Numeric type for the matrix value. |
Index_ | Integer type for the row/column indices. |
ptr | A pointer to a tatami::Matrix instance. |
ptr
. The assumption is that ptr
will always outlive the returned pointer.