tatami_tiledb
tatami bindings for TileDB-backed matrices
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tatami_tiledb::DenseMatrix< Value_, Index_ > Class Template Reference

TileDB-backed dense matrix. More...

#include <DenseMatrix.hpp>

Inheritance diagram for tatami_tiledb::DenseMatrix< Value_, Index_ >:
Inheritance graph
[legend]
Collaboration diagram for tatami_tiledb::DenseMatrix< Value_, Index_ >:
Collaboration graph
[legend]

Public Member Functions

 DenseMatrix (const std::string &uri, std::string attribute, tiledb::Context ctx, const DenseMatrixOptions &options)
 
 DenseMatrix (const std::string &uri, std::string attribute, const DenseMatrixOptions &options)
 
 DenseMatrix (const std::string &uri, std::string attribute)
 
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 &) const
 
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > dense (bool row, Index_ block_start, Index_ block_length, const tatami::Options &) const
 
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > dense (bool row, tatami::VectorPtr< Index_ > indices_ptr, const tatami::Options &) 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::OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > oracle, const tatami::Options &) const
 
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const tatami::Options &) const
 
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > dense (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > oracle, tatami::VectorPtr< Index_ > indices_ptr, const tatami::Options &) const
 
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > oracle, const tatami::Options &opt) const
 
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > sparse (bool row, std::shared_ptr< const tatami::Oracle< Index_ > > oracle, 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_ > > oracle, 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_>
class tatami_tiledb::DenseMatrix< Value_, Index_ >

TileDB-backed dense matrix.

Template Parameters
Value_Numeric type of the matrix value.
Index_Integer type for the row/column indices.

Numeric dense matrix stored in a 2-dimensional TileDB array. Chunks of data are loaded from file as needed by tatami::Extractor objects, with additional caching to avoid repeated reads from disk. The size of cached chunks is determined by the extent of the tiles in the TileDB array.

The TileDB library is thread-safe so no additional work is required to use this class in parallel code. Nonetheless, users can force all calls to TileDB to occur in serial by defining the TATAMI_TILEDB_PARALLEL_LOCK macro. This should be a function-like macro that accepts a function and executes it inside a user-defined serial section.

Constructor & Destructor Documentation

◆ DenseMatrix() [1/3]

template<typename Value_ , typename Index_ >
tatami_tiledb::DenseMatrix< Value_, Index_ >::DenseMatrix ( const std::string &  uri,
std::string  attribute,
tiledb::Context  ctx,
const DenseMatrixOptions options 
)
inline
Parameters
uriFile path (or some other appropriate location) of the TileDB array.
attributeName of the attribute containing the data of interest.
contextA TileDB Context object, typically with some custom configuration.
optionsFurther options.

◆ DenseMatrix() [2/3]

template<typename Value_ , typename Index_ >
tatami_tiledb::DenseMatrix< Value_, Index_ >::DenseMatrix ( const std::string &  uri,
std::string  attribute,
const DenseMatrixOptions options 
)
inline
Parameters
uriFile path (or some other appropriate location) of the TileDB array.
attributeName of the attribute containing the data of interest.
optionsFurther options.

◆ DenseMatrix() [3/3]

template<typename Value_ , typename Index_ >
tatami_tiledb::DenseMatrix< Value_, Index_ >::DenseMatrix ( const std::string &  uri,
std::string  attribute 
)
inline
Parameters
uriFile path (or some other appropriate location) of the TileDB array.
attributeName of the attribute containing the data of interest.

Member Function Documentation

◆ nrow()

template<typename Value_ , typename Index_ >
Index_ tatami_tiledb::DenseMatrix< Value_, Index_ >::nrow ( ) const
inlinevirtual

◆ ncol()

template<typename Value_ , typename Index_ >
Index_ tatami_tiledb::DenseMatrix< Value_, Index_ >::ncol ( ) const
inlinevirtual

◆ is_sparse()

template<typename Value_ , typename Index_ >
bool tatami_tiledb::DenseMatrix< Value_, Index_ >::is_sparse ( ) const
inlinevirtual

◆ is_sparse_proportion()

template<typename Value_ , typename Index_ >
double tatami_tiledb::DenseMatrix< Value_, Index_ >::is_sparse_proportion ( ) const
inlinevirtual

◆ prefer_rows()

template<typename Value_ , typename Index_ >
bool tatami_tiledb::DenseMatrix< Value_, Index_ >::prefer_rows ( ) const
inlinevirtual

◆ prefer_rows_proportion()

template<typename Value_ , typename Index_ >
double tatami_tiledb::DenseMatrix< Value_, Index_ >::prefer_rows_proportion ( ) const
inlinevirtual

◆ uses_oracle()

template<typename Value_ , typename Index_ >
bool tatami_tiledb::DenseMatrix< Value_, Index_ >::uses_oracle ( bool  ) const
inlinevirtual

◆ dense() [1/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::dense ( bool  row,
const tatami::Options  
) const
inlinevirtual

◆ dense() [2/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::dense ( bool  row,
Index_  block_start,
Index_  block_length,
const tatami::Options  
) const
inlinevirtual

◆ dense() [3/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::MyopicDenseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::dense ( bool  row,
tatami::VectorPtr< Index_ >  indices_ptr,
const tatami::Options  
) const
inlinevirtual

◆ sparse() [1/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::sparse ( bool  row,
const tatami::Options opt 
) const
inlinevirtual

◆ sparse() [2/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::sparse ( bool  row,
Index_  block_start,
Index_  block_length,
const tatami::Options opt 
) const
inlinevirtual

◆ sparse() [3/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::MyopicSparseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::sparse ( bool  row,
tatami::VectorPtr< Index_ >  indices_ptr,
const tatami::Options opt 
) const
inlinevirtual

◆ dense() [4/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::dense ( bool  row,
std::shared_ptr< const tatami::Oracle< Index_ > >  oracle,
const tatami::Options  
) const
inlinevirtual

◆ dense() [5/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::dense ( bool  row,
std::shared_ptr< const tatami::Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const tatami::Options  
) const
inlinevirtual

◆ dense() [6/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::OracularDenseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::dense ( bool  row,
std::shared_ptr< const tatami::Oracle< Index_ > >  oracle,
tatami::VectorPtr< Index_ >  indices_ptr,
const tatami::Options  
) const
inlinevirtual

◆ sparse() [4/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::sparse ( bool  row,
std::shared_ptr< const tatami::Oracle< Index_ > >  oracle,
const tatami::Options opt 
) const
inlinevirtual

◆ sparse() [5/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::sparse ( bool  row,
std::shared_ptr< const tatami::Oracle< Index_ > >  oracle,
Index_  block_start,
Index_  block_length,
const tatami::Options opt 
) const
inlinevirtual

◆ sparse() [6/6]

template<typename Value_ , typename Index_ >
std::unique_ptr< tatami::OracularSparseExtractor< Value_, Index_ > > tatami_tiledb::DenseMatrix< Value_, Index_ >::sparse ( bool  row,
std::shared_ptr< const tatami::Oracle< Index_ > >  oracle,
tatami::VectorPtr< Index_ >  indices_ptr,
const tatami::Options opt 
) const
inlinevirtual

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