|
| DenseMatrix (std::string file, std::string name, bool transpose, const DenseMatrixOptions &options) |
|
| DenseMatrix (std::string file, std::string name, bool transpose) |
|
Index_ | nrow () const |
|
Index_ | ncol () const |
|
bool | prefer_rows () const |
|
double | prefer_rows_proportion () const |
|
bool | uses_oracle (bool) const |
|
bool | is_sparse () const |
|
double | is_sparse_proportion () 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 |
|
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 |
|
template<typename Value_, typename Index_, typename CachedValue_ = Value_>
class tatami_hdf5::DenseMatrix< Value_, Index_, CachedValue_ >
Dense matrix backed by a DataSet in a HDF5 file.
This class retrieves data from the HDF5 file on demand rather than loading it all in at the start. This allows us to handle very large datasets in limited memory at the cost of some speed.
We manually handle the chunk caching to speed up access for consecutive rows and columns. The policy is to minimize the number of calls to the HDF5 library by requesting large contiguous slices where possible, where each slice typically consists of multiple rows/columns that belong in the same HDF5 chunk. The size of the slice is determined by the options
in the constructor.
Callers should follow the prefer_rows()
suggestion when extracting data, as this tries to minimize the number of chunks that need to be read per access request. If they do not, the access pattern on disk may be slightly to highly suboptimal, depending on the chunk dimensions.
As the HDF5 library is not generally thread-safe, the HDF5-related operations should only be run in a single thread. This is normally handled automatically but developers can check out serialize()
to customize the locking scheme.
- Template Parameters
-
Value_ | Type of the matrix values. |
Index_ | Type of the row/column indices. |
CachedValue_ | Type of the matrix value to store in the cache. This can be set to a narrower type than Value_ to save memory and improve cache performance, if a smaller type is known to be able to store the values (based on their HDF5 type or other knowledge). |