tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
tatami Namespace Reference

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)
 

Detailed Description

Flexible representations for matrix data.

Typedef Documentation

◆ DenseExtractor

template<bool oracle_, typename Value_ , typename Index_ >
using tatami::DenseExtractor = typename std::conditional<oracle_, OracularDenseExtractor<Value_, Index_>, MyopicDenseExtractor<Value_, Index_> >::type
Template Parameters
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.

◆ SparseExtractor

template<bool oracle_, typename Value_ , typename Index_ >
using tatami::SparseExtractor = typename std::conditional<oracle_, OracularSparseExtractor<Value_, Index_>, MyopicSparseExtractor<Value_, Index_> >::type
Template Parameters
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.

◆ VectorPtr

template<typename Index_ >
using tatami::VectorPtr = std::shared_ptr<const std::vector<Index_> >
Template Parameters
IndexRow/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.

◆ NumericMatrix

using tatami::NumericMatrix = Matrix<double, int>

A convenient shorthand for the most common use case of double-precision matrices.

◆ DelayedBinaryIsometricAddHelper

template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int>
using tatami::DelayedBinaryIsometricAddHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::ADD, OutputValue_, InputValue_, Index_>

Convenient alias for the addition helper.

Template Parameters
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.

◆ DelayedBinaryIsometricSubtractHelper

template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int>
using tatami::DelayedBinaryIsometricSubtractHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::SUBTRACT, OutputValue_, InputValue_, Index_>

Convenient alias for the subtraction helper.

Template Parameters
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.

◆ DelayedBinaryIsometricMultiplyHelper

template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int>
using tatami::DelayedBinaryIsometricMultiplyHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::MULTIPLY, OutputValue_, InputValue_, Index_>

Convenient alias for the multiplication helper.

Template Parameters
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.

◆ DelayedBinaryIsometricDivideHelper

template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int>
using tatami::DelayedBinaryIsometricDivideHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::DIVIDE, OutputValue_, InputValue_, Index_>

Convenient alias for the division helper.

Template Parameters
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.

◆ DelayedBinaryIsometricPowerHelper

template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int>
using tatami::DelayedBinaryIsometricPowerHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::POWER, OutputValue_, InputValue_, Index_>

Convenient alias for the power operation helper.

Template Parameters
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.

◆ DelayedBinaryIsometricModuloHelper

template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int>
using tatami::DelayedBinaryIsometricModuloHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::MODULO, OutputValue_, InputValue_, Index_>

Convenient alias for the modulo operation helper.

Template Parameters
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.

◆ DelayedBinaryIsometricIntegerDivideHelper

template<typename OutputValue_ = double, typename InputValue_ = double, typename Index_ = int>
using tatami::DelayedBinaryIsometricIntegerDivideHelper = DelayedBinaryIsometricArithmeticHelper<ArithmeticOperation::INTEGER_DIVIDE, OutputValue_, InputValue_, Index_>

Convenient alias for the integer division helper.

Template Parameters
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.

◆ DelayedBinaryIsometricBooleanEqualHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricBooleanEqualHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean equality helper.

Template Parameters
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.

◆ DelayedBinaryIsometricBooleanAndHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricBooleanAndHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean AND helper.

Template Parameters
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.

◆ DelayedBinaryIsometricBooleanOrHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricBooleanOrHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean OR helper.

Template Parameters
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.

◆ DelayedBinaryIsometricBooleanXorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricBooleanXorHelper = DelayedBinaryIsometricBooleanHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean XOR helper.

Template Parameters
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.

◆ DelayedBinaryIsometricEqualHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_>

Convenient alias for the equality comparison helper.

Template Parameters
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.

◆ DelayedBinaryIsometricGreaterThanHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricGreaterThanHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_>

Convenient alias for the "greater than" comparison helper.

Template Parameters
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.

◆ DelayedBinaryIsometricLessThanHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricLessThanHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_>

Convenient alias for the "less than" comparison helper.

Template Parameters
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.

◆ DelayedBinaryIsometricGreaterThanOrEqualHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricGreaterThanOrEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_>

Convenient alias for the "greater than or equal" comparison helper.

Template Parameters
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.

◆ DelayedBinaryIsometricLessThanOrEqualHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricLessThanOrEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_>

Convenient alias for the "less than or equal" comparison helper.

Template Parameters
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.

◆ DelayedBinaryIsometricNotEqualHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedBinaryIsometricNotEqualHelper = DelayedBinaryIsometricCompareHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_>

Convenient alias for the non-equality comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricAddScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricAddScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::ADD, true, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar addition helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubtractScalarHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricSubtractScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::SUBTRACT, right_, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar subtraction helper.

Template Parameters
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.

◆ DelayedUnaryIsometricMultiplyScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricMultiplyScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::MULTIPLY, true, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar multiplication helper.

Template Parameters
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.

◆ DelayedUnaryIsometricDivideScalarHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricDivideScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::DIVIDE, right_, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar division helper.

Template Parameters
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.

◆ DelayedUnaryIsometricPowerScalarHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricPowerScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::POWER, right_, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar power helper.

Template Parameters
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.

◆ DelayedUnaryIsometricModuloScalarHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricModuloScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::MODULO, right_, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar modulo helper.

Template Parameters
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.

◆ DelayedUnaryIsometricIntegerDivideScalarHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricIntegerDivideScalarHelper = DelayedUnaryIsometricArithmeticScalarHelper<ArithmeticOperation::INTEGER_DIVIDE, right_, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar modulo helper.

Template Parameters
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.

◆ DelayedUnaryIsometricAddVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricAddVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::ADD, true, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector addition helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubtractVectorHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricSubtractVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::SUBTRACT, right_, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector subtraction helper.

Template Parameters
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.

◆ DelayedUnaryIsometricMultiplyVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricMultiplyVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::MULTIPLY, true, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector multiplication helper.

Template Parameters
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.

◆ DelayedUnaryIsometricDivideVectorHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricDivideVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::DIVIDE, right_, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector division helper.

Template Parameters
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.

◆ DelayedUnaryIsometricPowerVectorHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricPowerVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::POWER, right_, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector power helper.

Template Parameters
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.

◆ DelayedUnaryIsometricModuloVectorHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricModuloVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::MODULO, right_, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector modulo helper.

Template Parameters
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.

◆ DelayedUnaryIsometricIntegerDivideVectorHelper

template<bool right_, typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricIntegerDivideVectorHelper = DelayedUnaryIsometricArithmeticVectorHelper<ArithmeticOperation::INTEGER_DIVIDE, right_, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector modulo helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricBooleanEqualScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean equality scalar helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanAndScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricBooleanAndScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean AND scalar helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanOrScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricBooleanOrScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean OR scalar helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanXorScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricBooleanXorScalarHelper = DelayedUnaryIsometricBooleanScalarHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_>

Convenient alias for the boolean XOR scalar helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricBooleanEqualVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::EQUAL, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the boolean equality vector helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanAndVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricBooleanAndVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::AND, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the boolean AND vector helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanOrVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricBooleanOrVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::OR, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the boolean OR vector helper.

Template Parameters
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.

◆ DelayedUnaryIsometricBooleanXorVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricBooleanXorVectorHelper = DelayedUnaryIsometricBooleanVectorHelper<BooleanOperation::XOR, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the boolean XOR vector helper.

Template Parameters
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.

◆ DelayedUnaryIsometricEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar equality comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricGreaterThanScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricGreaterThanScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "greater than" comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricLessThanScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricLessThanScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "less than" comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricGreaterThanOrEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricGreaterThanOrEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "greater than or equal" comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricLessThanOrEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricLessThanOrEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "less than or equal" comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricNotEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricNotEqualScalarHelper = DelayedUnaryIsometricCompareScalarHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar non-equality comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector equality comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricGreaterThanVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricGreaterThanVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector "greater than" comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricLessThanVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricLessThanVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector "less than" comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricGreaterThanOrEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename 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.

Template Parameters
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.

◆ DelayedUnaryIsometricLessThanOrEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename 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.

Template Parameters
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.

◆ DelayedUnaryIsometricNotEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Vector_ >
using tatami::DelayedUnaryIsometricNotEqualVectorHelper = DelayedUnaryIsometricCompareVectorHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Vector_>

Convenient alias for the vector non-equality comparison helper.

Template Parameters
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.

◆ DelayedUnaryIsometricIsnanHelper

template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricIsnanHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISNAN, pass_, OutputValue_, InputValue_, Index_>

Convenient alias for the "comparison to NaN" helper.

Template Parameters
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.

◆ DelayedUnaryIsometricIsinfHelper

template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricIsinfHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISINF, pass_, OutputValue_, InputValue_, Index_>

Convenient alias for the "comparison to infinity" helper.

Template Parameters
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.

◆ DelayedUnaryIsometricIsfiniteHelper

template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricIsfiniteHelper = DelayedUnaryIsometricSpecialCompareHelper<SpecialCompareOperation::ISFINITE, pass_, OutputValue_, InputValue_, Index_>

Convenient alias for the "is finite" helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricSubstituteEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar equality substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteGreaterThanScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricSubstituteGreaterThanScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "greater than" substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteLessThanScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricSubstituteLessThanScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "less than" substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteGreaterThanOrEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricSubstituteGreaterThanOrEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::GREATER_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "greater than or equal" substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteLessThanOrEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricSubstituteLessThanOrEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::LESS_THAN_OR_EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar "less than or equal" substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteNotEqualScalarHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename Scalar_ >
using tatami::DelayedUnaryIsometricSubstituteNotEqualScalarHelper = DelayedUnaryIsometricSubstituteScalarHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, Scalar_>

Convenient alias for the scalar non-equality substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ >
using tatami::DelayedUnaryIsometricSubstituteEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_>

Convenient alias for the scalar equality substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteGreaterThanVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ >
using tatami::DelayedUnaryIsometricSubstituteGreaterThanVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::GREATER_THAN, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_>

Convenient alias for the scalar "greater than" substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteLessThanVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ >
using tatami::DelayedUnaryIsometricSubstituteLessThanVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::LESS_THAN, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_>

Convenient alias for the scalar "less than" substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteGreaterThanOrEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ >
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.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteLessThanOrEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ >
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.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteNotEqualVectorHelper

template<typename OutputValue_ , typename InputValue_ , typename Index_ , typename ComparedVector_ , typename SubstituteVector_ >
using tatami::DelayedUnaryIsometricSubstituteNotEqualVectorHelper = DelayedUnaryIsometricSubstituteVectorHelper<CompareOperation::NOT_EQUAL, OutputValue_, InputValue_, Index_, ComparedVector_, SubstituteVector_>

Convenient alias for the scalar non-equality substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteIsnanHelper

template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricSubstituteIsnanHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISNAN, pass_, OutputValue_, InputValue_, Index_>

Convenient alias for the NaN substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteIsinfHelper

template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricSubstituteIsinfHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISINF, pass_, OutputValue_, InputValue_, Index_>

Convenient alias for the infinity substitution helper.

Template Parameters
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.

◆ DelayedUnaryIsometricSubstituteIsfiniteHelper

template<bool pass_, typename OutputValue_ , typename InputValue_ , typename Index_ >
using tatami::DelayedUnaryIsometricSubstituteIsfiniteHelper = DelayedUnaryIsometricSpecialSubstituteHelper<SpecialCompareOperation::ISFINITE, pass_, OutputValue_, InputValue_, Index_>

Convenient alias for the finite value substitution helper.

Template Parameters
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.

◆ ElementType

template<class Array_ >
using tatami::ElementType = typename std::remove_cv<typename std::remove_reference<decltype(std::declval<Array_>()[0])>::type>::type
Template Parameters
Array_Some array of values that are accessed with [.

Extract the type of array elements, after stripping away references and const-ness.

◆ MaybeOracle

template<bool oracle_, typename Index_ >
using tatami::MaybeOracle = typename std::conditional<oracle_, std::shared_ptr<const Oracle<Index_> >, bool>::type
Template Parameters
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_.

Enumeration Type Documentation

◆ DimensionSelectionType

enum class tatami::DimensionSelectionType : char
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.

◆ ArithmeticOperation

enum class tatami::ArithmeticOperation : char
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.

◆ BooleanOperation

enum class tatami::BooleanOperation : char
strong

Type of boolean operation.

◆ CompareOperation

enum class tatami::CompareOperation : char
strong

Type of comparison operation.

◆ SpecialCompareOperation

enum class tatami::SpecialCompareOperation : char
strong

Type of comparison operation for special IEEE values.

◆ SomeNumericType

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.

Function Documentation

◆ convert_to_dense() [1/2]

template<typename StoredValue_ , typename InputValue_ , typename InputIndex_ >
void tatami::convert_to_dense ( const Matrix< InputValue_, InputIndex_ > & matrix,
bool row_major,
StoredValue_ * store,
const ConvertToDenseOptions & options )
Template Parameters
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.
Parameters
matrixA tatami::Matrix.
row_majorWhether to store the output as a row-major matrix.
[out]storePointer 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.
optionsFurther options.

◆ convert_to_dense() [2/2]

template<typename Value_ , typename Index_ , typename StoredValue_ = Value_, typename InputValue_ , typename InputIndex_ >
std::shared_ptr< Matrix< Value_, Index_ > > tatami::convert_to_dense ( const Matrix< InputValue_, InputIndex_ > & matrix,
bool row_major,
const ConvertToDenseOptions & options )
inline
Template Parameters
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.
Parameters
matrixA tatami::Matrix.
row_majorWhether to return a row-major matrix.
optionsFurther options.
Returns
A pointer to a new 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.

◆ transpose() [1/2]

template<typename Input_ , typename Output_ >
void tatami::transpose ( const Input_ * input,
size_t nrow,
size_t ncol,
size_t input_stride,
Output_ * output,
size_t output_stride )
Template Parameters
Input_Input type.
Output_Output type.
Parameters
[in]inputPointer 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.
nrowNumber of rows in the matrix stored at input.
ncolNumber of columns in the matrix stored at input.
input_strideDistance between corresponding entries on consecutive rows of the input matrix. This should be greater than or equal to ncol.
[out]outputPointer 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_strideDistance 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.

◆ transpose() [2/2]

template<typename Input_ , typename Output_ >
void tatami::transpose ( const Input_ * input,
size_t nrow,
size_t ncol,
Output_ * output )
Template Parameters
Input_Input type.
Output_Output type.
Parameters
[in]inputPointer 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.
nrowNumber of rows in the matrix stored at input.
ncolNumber of columns in the matrix stored at input.
[out]outputPointer 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.

◆ make_DelayedCast()

template<typename ValueOut_ , typename IndexOut_ , typename ValueIn_ , typename IndexIn_ >
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.

Template Parameters
ValueOut_Data type to cast to.
IndexOut_Index type to cast to.
ValueIn_Data type to cast from.
IndexIn_Index type to cast from.
Parameters
pPointer to the (possbly const) Matrix instance to cast from.
Returns
Pointer to a Matrix instance of the desired interface type.

◆ compress_sparse_triplets()

template<class Values_ , class RowIndices_ , class ColumnIndices_ >
std::vector< size_t > tatami::compress_sparse_triplets ( size_t nrow,
size_t ncol,
Values_ & values,
RowIndices_ & row_indices,
ColumnIndices_ & column_indices,
bool csr )
Template Parameters
Values_Random-access container for the values.
RowIndices_Random access container for the row indices.
ColumnIndices_Random access container for the column indices.
Parameters
nrowNumber of rows.
ncolNumber of columns.
row_indicesRow indices of the structural non-zeros. Values must be non-negative integers less than nrow.
column_indicesColumn 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.
valuesValues 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.
csrWhether to create a compressed sparse row format. If false, the compressed sparse column format is used instead.
Returns
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).

◆ count_compressed_sparse_non_zeros()

template<typename Value_ , typename Index_ , typename Count_ >
void tatami::count_compressed_sparse_non_zeros ( const tatami::Matrix< Value_, Index_ > & matrix,
bool row,
Count_ * output,
const CountCompressedSparseNonZerosOptions & options )
Template Parameters
Value_Type of value in the matrix.
Index_Integer type of row/column index.
Count_Integer type for the non-zero count.
Parameters
matrixA tatami::Matrix.
rowWhether to count structural non-zeros by row.
[out]outputPointer 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).
optionsFurther 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()).

◆ fill_compressed_sparse_contents()

template<typename InputValue_ , typename InputIndex_ , typename Pointer_ , typename StoredValue_ , typename StoredIndex_ >
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 )
Template Parameters
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.
Parameters
matrixA tatami::Matrix.
rowWhether to fill output_value and output_index by row, i.e., the output represents a compressed sparse row matrix.
[in]pointersPointer 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_valuePointer 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_indexPointer 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).
optionsFurther options.

◆ retrieve_compressed_sparse_contents()

template<typename StoredValue_ , typename StoredIndex_ , typename StoredPointer_ = size_t, typename InputValue_ , typename InputIndex_ >
CompressedSparseContents< StoredValue_, StoredIndex_, StoredPointer_ > tatami::retrieve_compressed_sparse_contents ( const Matrix< InputValue_, InputIndex_ > & matrix,
bool row,
const RetrieveCompressedSparseContentsOptions & options )
Template Parameters
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.
Parameters
matrixA tatami::Matrix.
rowWhether to retrieve the contents of matrix by row, i.e., the output is a compressed sparse row matrix.
optionsFurther options.
Returns
Contents of the sparse matrix in compressed form, see 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.

◆ convert_to_compressed_sparse()

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_ > > tatami::convert_to_compressed_sparse ( const Matrix< InputValue_, InputIndex_ > & matrix,
bool row,
const ConvertToCompressedSparseOptions & options )
Template Parameters
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.
Parameters
matrixA tatami::Matrix.
rowWhether to return a compressed sparse row matrix.
optionsFurther options.
Returns
A pointer to a new 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.

◆ retrieve_fragmented_sparse_contents()

template<typename StoredValue_ , typename StoredIndex_ , typename InputValue_ , typename InputIndex_ >
FragmentedSparseContents< StoredValue_, StoredIndex_ > tatami::retrieve_fragmented_sparse_contents ( const Matrix< InputValue_, InputIndex_ > & matrix,
bool row,
const RetrieveFragmentedSparseContentsOptions & options )
Template Parameters
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.
Parameters
matrixPointer to a tatami::Matrix.
rowWhether to retrieve the contents of matrix by row, i.e., the output is a fragmented sparse row matrix.
optionsFurther options.
Returns
Contents of the sparse matrix in fragmented form, see FragmentedSparseContents.

◆ convert_to_fragmented_sparse()

template<typename Value_ , typename Index_ , typename StoredValue_ = Value_, typename StoredIndex_ = Index_, typename InputValue_ , typename InputIndex_ >
std::shared_ptr< Matrix< Value_, Index_ > > tatami::convert_to_fragmented_sparse ( const Matrix< InputValue_, InputIndex_ > & matrix,
bool row,
const ConvertToFragmentedSparseOptions & options )
Template Parameters
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.
Parameters
matrixA tatami::Matrix.
rowWhether to return a fragmented sparse row matrix.
optionsFurther options.
Returns
A pointer to a new 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.

◆ make_DelayedSubsetBlock()

template<typename Value_ , typename Index_ >
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.

Template Parameters
Value_Type of matrix value.
Index_Integer type for the row/column indices.
Parameters
matrixPointer to the underlying (pre-subset) Matrix.
subset_startIndex of the start of the block. This should be a row index if by_row = true and a column index otherwise.
subset_lengthIndex of the one-past-the-end of the block.
by_rowWhether to apply the subset to the rows. If false, the subset is applied to the columns.
Returns
A pointer to a DelayedSubsetBlock instance.

◆ make_DelayedSubset()

template<typename Value_ , typename Index_ , class SubsetStorage_ >
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.

Template Parameters
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.
Parameters
matrixPointer to a (possibly const) Matrix.
subsetInstance of the subset index vector.
by_rowWhether to apply the subset to the rows. If false, the subset is applied to the columns.
Returns
A pointer to a DelayedSubset instance.

◆ consecutive_extractor()

template<bool sparse_, typename Value_ , typename Index_ , typename ... Args_>
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.

Template Parameters
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.
Parameters
matrixA tatami::Matrix to iterate over.
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
iter_startIndex of the first row (if row = true) or column (otherwise) of the iteration range.
iter_lengthNumber of rows (if row = true) or columns (otherwise) in the iteration range.
argsFurther arguments to pass to new_extractor().
Returns
An extractor for iteration over consecutive rows/columns in [iter_start, iter_start + iter_length). This may be either an OracularDenseExtractor or OracularSparseExtractor depending on sparse_.

◆ copy_n()

template<typename Value_ , typename Size_ >
Value_ * tatami::copy_n ( const Value_ * input,
Size_ n,
Value_ * output )
Template Parameters
Value_Type of value being copied.
Size_Type for the array length.
Parameters
[in]inputPointer to a source array of size n.
nLength of the array.
[out]outputPointer to a destination array of size n.
Returns
Values are copied from input to output, and output is returned. This is a no-op if input == output.

◆ new_extractor()

template<bool sparse_, bool oracle_, typename Value_ , typename Index_ , typename ... Args_>
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.

Template Parameters
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.
Parameters
[in]matrixA tatami::Matrix object to iterate over.
rowWhether to create a row-wise extractor, i.e., the rows are the target dimension.
oraclePointer to an oracle if oracle_ = true, otherwise a placeholder boolean that is ignored.
argsZero or more additional arguments to pass to methods like Matrix::dense_row().
Returns
An extractor to access elements of the requested dimension of ptr. This may be any of MyopicDenseExtractor, MyopicSparseExtractor, OracularDenseExtractor or OracularSparseExtractor, depending on sparse_ and oracle_.

◆ parallelize()

template<bool parallel_ = true, class Function_ , typename Index_ >
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.

Template Parameters
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:
  • thread, the thread number executing this task range. This will be passed as a size_t.
  • task_start, the start index of the task range. This will be passed as a Index_.
  • task_length, the number of tasks in the task range. This will be passed as a Index_.
Index_Integer type for the number of tasks.
Parameters
funFunction that executes a contiguous range of tasks.
tasksNumber of tasks.
threadsNumber of threads.

◆ process_consecutive_indices()

template<typename Index_ , class Function_ >
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.

Template Parameters
Index_Integer type for the row/column indices.
Function_Function to apply to each contiguous run.
Parameters
indicesPointer to an array of sorted and unique indices for row/column elements.
lengthLength of the array pointed to by indices.
funFunction 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.

◆ wrap_shared_ptr()

template<typename Value_ , typename Index_ >
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.

Template Parameters
Value_Numeric type for the matrix value.
Index_Integer type for the row/column indices.
Parameters
ptrA pointer to a tatami::Matrix instance.
Returns
A shared pointer to the same object addressed by ptr. The assumption is that ptr will always outlive the returned pointer.