1#ifndef TATAMI_NEW_EXTRACTOR_HPP
2#define TATAMI_NEW_EXTRACTOR_HPP
19template<
bool oracle_,
typename Index_>
20using MaybeOracle =
typename std::conditional<oracle_, std::shared_ptr<const Oracle<Index_> >,
bool>::type;
41template<
bool sparse_,
bool oracle_,
typename Value_,
typename Index_,
typename ... Args_>
47 if constexpr(sparse_) {
48 if constexpr(oracle_) {
50 return ptr->
sparse_row(std::move(oracle), std::forward<Args_>(args)...);
52 return ptr->
sparse_column(std::move(oracle), std::forward<Args_>(args)...);
56 return ptr->
sparse_row(std::forward<Args_>(args)...);
62 if constexpr(oracle_) {
64 return ptr->
dense_row(std::move(oracle), std::forward<Args_>(args)...);
66 return ptr->
dense_column(std::move(oracle), std::forward<Args_>(args)...);
70 return ptr->
dense_row(std::forward<Args_>(args)...);
82template<
bool row_,
bool sparse_,
typename Value_,
typename Index_>
87template<
bool row_,
bool sparse_,
typename Value_,
typename Index_>
88auto new_extractor(
const Matrix<Value_, Index_>* ptr,
const Options& opt) {
92template<
bool row_,
bool sparse_,
typename Value_,
typename Index_,
typename ... Args_>
93auto new_extractor(
const Matrix<Value_, Index_>* ptr, Index_ start, Index_ len, Args_&&... args) {
97template<
bool row_,
bool sparse_,
typename Value_,
typename Index_,
typename ... Args_>
98auto new_extractor(
const Matrix<Value_, Index_>* ptr, std::vector<Index_> i, Args_&&... args) {
Virtual class for a matrix of some numeric type.
Virtual class for a matrix.
Definition Matrix.hpp:59
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_row(const Options &opt) const
Definition Matrix.hpp:197
std::unique_ptr< MyopicDenseExtractor< Value_, Index_ > > dense_column(const Options &opt) const
Definition Matrix.hpp:242
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_column(const Options &opt) const
Definition Matrix.hpp:451
std::unique_ptr< MyopicSparseExtractor< Value_, Index_ > > sparse_row(const Options &opt) const
Definition Matrix.hpp:406
Flexible representations for matrix data.
Definition Extractor.hpp:15
typename std::conditional< oracle_, std::shared_ptr< const Oracle< Index_ > >, bool >::type MaybeOracle
Definition new_extractor.hpp:20
auto new_extractor(const Matrix< Value_, Index_ > *ptr, bool row, MaybeOracle< oracle_, Index_ > oracle, Args_ &&... args)
Definition new_extractor.hpp:42