1#ifndef TATAMI_DELAYED_TRANSPOSE
2#define TATAMI_DELAYED_TRANSPOSE
4#include "../base/Matrix.hpp"
26template<
typename Value_,
typename Index_>
35 std::shared_ptr<const Matrix<Value_, Index_> > my_matrix;
39 return my_matrix->ncol();
43 return my_matrix->nrow();
47 return my_matrix->is_sparse();
51 return my_matrix->is_sparse_proportion();
55 return !my_matrix->prefer_rows();
59 return 1 - my_matrix->prefer_rows_proportion();
63 return my_matrix->uses_oracle(!
row);
74 std::unique_ptr<MyopicDenseExtractor<Value_, Index_> >
dense(
bool row,
const Options&
opt)
const {
75 return my_matrix->dense(!
row,
opt);
91 return my_matrix->sparse(!
row,
opt);
145template<
typename Value_,
typename Index_>
153template<
typename Value_,
typename Index_>
Delayed transposition of a matrix.
Definition DelayedTranspose.hpp:27
DelayedTranspose(std::shared_ptr< const Matrix< Value_, Index_ > > matrix)
Definition DelayedTranspose.hpp:32
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse(bool row, Index_ block_start, Index_ block_length, const Options &opt) const
Definition DelayedTranspose.hpp:94
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense(bool row, VectorPtr< Index_ > indices_ptr, const Options &opt) const
Definition DelayedTranspose.hpp:82
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense(bool row, Index_ block_start, Index_ block_length, const Options &opt) const
Definition DelayedTranspose.hpp:78
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense(bool row, const Options &opt) const
Definition DelayedTranspose.hpp:74
Index_ ncol() const
Definition DelayedTranspose.hpp:42
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse(bool row, std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
Definition DelayedTranspose.hpp:126
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse(bool row, VectorPtr< Index_ > indices_ptr, const Options &opt) const
Definition DelayedTranspose.hpp:98
bool is_sparse() const
Definition DelayedTranspose.hpp:46
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense(bool row, std::shared_ptr< const Oracle< Index_ > > oracle, Index_ block_start, Index_ block_length, const Options &opt) const
Definition DelayedTranspose.hpp:110
bool uses_oracle(bool row) const
Definition DelayedTranspose.hpp:62
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse(bool row, const Options &opt) const
Definition DelayedTranspose.hpp:90
bool prefer_rows() const
Definition DelayedTranspose.hpp:54
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse(bool row, std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
Definition DelayedTranspose.hpp:122
std::unique_ptr< OracularSparseExtractor< Value_, Index_ > > sparse(bool row, std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices, const Options &opt) const
Definition DelayedTranspose.hpp:130
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense(bool row, std::shared_ptr< const Oracle< Index_ > > oracle, const Options &opt) const
Definition DelayedTranspose.hpp:106
std::unique_ptr< OracularDenseExtractor< Value_, Index_ > > dense(bool row, std::shared_ptr< const Oracle< Index_ > > oracle, VectorPtr< Index_ > indices_ptr, const Options &opt) const
Definition DelayedTranspose.hpp:114
Index_ nrow() const
Definition DelayedTranspose.hpp:38
double is_sparse_proportion() const
Definition DelayedTranspose.hpp:50
double prefer_rows_proportion() const
Definition DelayedTranspose.hpp:58
Virtual class for a matrix.
Definition Matrix.hpp:59
Predict future access requests on the target dimension.
Definition Oracle.hpp:21
Flexible representations for matrix data.
Definition Extractor.hpp:15
std::shared_ptr< const std::vector< Index_ > > VectorPtr
Definition Matrix.hpp:26
std::shared_ptr< Matrix< Value_, Index_ > > make_DelayedTranspose(std::shared_ptr< const Matrix< Value_, Index_ > > matrix)
Definition DelayedTranspose.hpp:146
auto consecutive_extractor(const Matrix< Value_, Index_ > *mat, bool row, Index_ iter_start, Index_ iter_length, Args_ &&... args)
Definition consecutive_extractor.hpp:35
Options for accessing data from a Matrix instance.
Definition Options.hpp:30