tatami_r
R bindings to tatami matrices
Loading...
Searching...
No Matches
tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ > Class Template Reference

Unknown matrix-like object in R. More...

#include <UnknownMatrix.hpp>

Inheritance diagram for tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >:
tatami::Matrix< Value_, Index_ >

Public Member Functions

 UnknownMatrix (Rcpp::RObject seed, const UnknownMatrixOptions &opt)
 
 UnknownMatrix (Rcpp::RObject seed)
 
Index_ nrow () const
 
Index_ ncol () const
 
bool is_sparse () const
 
double is_sparse_proportion () const
 
bool prefer_rows () const
 
double prefer_rows_proportion () const
 
bool uses_oracle (bool) const
 
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > dense (bool row, const tatami::Options &opt) const
 
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > dense (bool row, Index_ block_start, Index_ block_length, const tatami::Options &opt) const
 
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > dense (bool row, tatami::VectorPtr< Index_ > indices_ptr, const tatami::Options &opt) const
 
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > ora, const tatami::Options &opt) const
 
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > ora, Index_ block_start, Index_ block_length, const tatami::Options &opt) const
 
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > ora, tatami::VectorPtr< Index_ > indices_ptr, const tatami::Options &opt) const
 
template<bool oracle_, template< bool, bool, typename, typename, typename, typename > class FromSparse_, typename ... Args_>
std::unique_ptr< tatami::SparseExtractor< oracle_, Value_, Index_ > > populate_sparse_internal (bool row, Index_ non_target_length, tatami::MaybeOracle< oracle_, Index_ > oracle, const tatami::Options &opt, Args_ &&... args) const
 
template<bool oracle_>
std::unique_ptr< tatami::SparseExtractor< oracle_, Value_, Index_ > > populate_sparse (bool row, tatami::MaybeOracle< oracle_, Index_ > ora, const tatami::Options &opt) const
 
template<bool oracle_>
std::unique_ptr< tatami::SparseExtractor< oracle_, Value_, Index_ > > populate_sparse (bool row, tatami::MaybeOracle< oracle_, Index_ > ora, Index_ block_start, Index_ block_length, const tatami::Options &opt) const
 
template<bool oracle_>
std::unique_ptr< tatami::SparseExtractor< oracle_, Value_, Index_ > > populate_sparse (bool row, tatami::MaybeOracle< oracle_, Index_ > ora, tatami::VectorPtr< Index_ > indices_ptr, const tatami::Options &opt) const
 
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > sparse (bool row, const tatami::Options &opt) const
 
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > sparse (bool row, Index_ block_start, Index_ block_length, const tatami::Options &opt) const
 
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > sparse (bool row, tatami::VectorPtr< Index_ > indices_ptr, const tatami::Options &opt) const
 
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > ora, const tatami::Options &opt) const
 
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > ora, Index_ block_start, Index_ block_length, const tatami::Options &opt) const
 
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > ora, tatami::VectorPtr< Index_ > indices_ptr, const tatami::Options &opt) const
 
- Public Member Functions inherited from tatami::Matrix< Value_, Index_ >
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row () const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row (std::vector< Index_ > indices) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column () const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column (std::vector< Index_ > indices) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row () const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row (std::vector< Index_ > indices) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_row (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column () const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (Index_ block_start, Index_ block_length) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column (std::vector< Index_ > indices) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices, const Options &opt) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr) const
 
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse_column (std::shared_ptr< const Oracle< Index_ > > oracle, std::vector< Index_ > indices) const
 

Additional Inherited Members

- Public Types inherited from tatami::Matrix< Value_, Index_ >
typedef Value_ value_type
 
typedef Index_ index_type
 

Detailed Description

template<typename Value_, typename Index_, typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
class tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >

Unknown matrix-like object in R.

Template Parameters
Value_Numeric type of data value for the interface.
Index_Integer type for the row/column indices, for the interface.

Pull data out of an unknown matrix-like object by calling methods from the DelayedArray package via Rcpp. This effectively extends tatami to work with any abstract numeric matrix that might be consumed by an R function.

Instances of class should only be constructed and destroyed in a serial context, specifically on the same thread running R itself. Calls to its methods may be parallelized but some additional effort is required to serialize calls to the R API; see executor() for more details.

Constructor & Destructor Documentation

◆ UnknownMatrix() [1/2]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::UnknownMatrix ( Rcpp::RObject seed,
const UnknownMatrixOptions & opt )
inline

This constructor should only be called in a serial context, as the (default) construction of Rcpp objects may call the R API.

Parameters
seedA matrix-like R object.
optExtraction options.

◆ UnknownMatrix() [2/2]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::UnknownMatrix ( Rcpp::RObject seed)
inline

This constructor overload uses the default Options(). Again, it should only be called in a serial context, as the (default) construction of Rcpp objects may call the R API.

Parameters
seedA matrix-like R object.

Member Function Documentation

◆ dense() [1/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::dense ( bool row,
const tatami::Options & opt ) const
inlinevirtual

◆ dense() [2/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::dense ( bool row,
Index_ block_start,
Index_ block_length,
const tatami::Options & opt ) const
inlinevirtual

◆ dense() [3/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::dense ( bool row,
std::shared_ptr< const tatami::Oracle< Index_ > > ora,
const tatami::Options & opt ) const
inlinevirtual

◆ dense() [4/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::dense ( bool row,
std::shared_ptr< const tatami::Oracle< Index_ > > ora,
Index_ block_start,
Index_ block_length,
const tatami::Options & opt ) const
inlinevirtual

◆ dense() [5/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::dense ( bool row,
std::shared_ptr< const tatami::Oracle< Index_ > > ora,
tatami::VectorPtr< Index_ > indices_ptr,
const tatami::Options & opt ) const
inlinevirtual

◆ dense() [6/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::dense ( bool row,
tatami::VectorPtr< Index_ > indices_ptr,
const tatami::Options & opt ) const
inlinevirtual

◆ is_sparse()

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
bool tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::is_sparse ( ) const
inlinevirtual

◆ is_sparse_proportion()

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
double tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::is_sparse_proportion ( ) const
inlinevirtual

◆ ncol()

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
Index_ tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::ncol ( ) const
inlinevirtual

◆ nrow()

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
Index_ tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::nrow ( ) const
inlinevirtual

◆ prefer_rows()

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
bool tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::prefer_rows ( ) const
inlinevirtual

◆ prefer_rows_proportion()

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
double tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::prefer_rows_proportion ( ) const
inlinevirtual

◆ sparse() [1/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::sparse ( bool row,
const tatami::Options & opt ) const
inlinevirtual

◆ sparse() [2/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::sparse ( bool row,
Index_ block_start,
Index_ block_length,
const tatami::Options & opt ) const
inlinevirtual

◆ sparse() [3/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::sparse ( bool row,
std::shared_ptr< const tatami::Oracle< Index_ > > ora,
const tatami::Options & opt ) const
inlinevirtual

◆ sparse() [4/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::sparse ( bool row,
std::shared_ptr< const tatami::Oracle< Index_ > > ora,
Index_ block_start,
Index_ block_length,
const tatami::Options & opt ) const
inlinevirtual

◆ sparse() [5/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::sparse ( bool row,
std::shared_ptr< const tatami::Oracle< Index_ > > ora,
tatami::VectorPtr< Index_ > indices_ptr,
const tatami::Options & opt ) const
inlinevirtual

◆ sparse() [6/6]

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::sparse ( bool row,
tatami::VectorPtr< Index_ > indices_ptr,
const tatami::Options & opt ) const
inlinevirtual

◆ uses_oracle()

template<typename Value_ , typename Index_ , typename CachedValue_ = Value_, typename CachedIndex_ = Index_>
bool tatami_r::UnknownMatrix< Value_, Index_, CachedValue_, CachedIndex_ >::uses_oracle ( bool ) const
inlinevirtual

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