tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
helper_interface.hpp
Go to the documentation of this file.
1#ifndef TATAMI_DELAYED_BINARY_ISOMETRIC_OPERATION_HELPER_INTERFACE_H
2#define TATAMI_DELAYED_BINARY_ISOMETRIC_OPERATION_HELPER_INTERFACE_H
3
4#include <vector>
5#include <optional>
7
13namespace tatami {
14
25template<typename OutputValue_, typename InputValue_, typename Index_>
27public:
41public:
56 virtual OutputValue_ fill(bool row, Index_ i) const = 0;
57
66 virtual bool zero_depends_on_row() const = 0;
67
76 virtual bool zero_depends_on_column() const = 0;
77
82 virtual bool non_zero_depends_on_row() const = 0;
83
88 virtual bool non_zero_depends_on_column() const = 0;
89
111 virtual void dense(bool row, Index_ i, Index_ start, Index_ length, const InputValue_* left_buffer, const InputValue_* right_buffer, OutputValue_* output_buffer) const = 0;
112
133 virtual void dense(bool row, Index_ i, const std::vector<Index_>& indices, const InputValue_* left_buffer, const InputValue_* right_buffer, OutputValue_* output_buffer) const = 0;
134
176 virtual Index_ sparse(
177 bool row,
178 Index_ i,
181 OutputValue_* output_value,
182 Index_* output_index,
183 bool report_value,
184 bool report_index)
185 const = 0;
186
190 virtual bool is_sparse() const = 0;
191
196 virtual std::optional<Index_> nrow() const = 0;
197
202 virtual std::optional<Index_> ncol() const = 0;
203};
204
205}
206
207#endif
Store information about extracted sparse elements.
Helper operation interface for DelayedBinaryIsometricOperation.
Definition helper_interface.hpp:26
virtual bool non_zero_depends_on_row() const =0
virtual Index_ sparse(bool row, Index_ i, const SparseRange< InputValue_, Index_ > &left, const SparseRange< InputValue_, Index_ > &right, OutputValue_ *output_value, Index_ *output_index, bool report_value, bool report_index) const =0
virtual std::optional< Index_ > nrow() const =0
virtual bool zero_depends_on_column() const =0
virtual void dense(bool row, Index_ i, const std::vector< Index_ > &indices, const InputValue_ *left_buffer, const InputValue_ *right_buffer, OutputValue_ *output_buffer) const =0
virtual std::optional< Index_ > ncol() const =0
virtual OutputValue_ fill(bool row, Index_ i) const =0
virtual void dense(bool row, Index_ i, Index_ start, Index_ length, const InputValue_ *left_buffer, const InputValue_ *right_buffer, OutputValue_ *output_buffer) const =0
virtual bool non_zero_depends_on_column() const =0
Flexible representations for matrix data.
Definition Extractor.hpp:15
A range of a sparse vector.
Definition SparseRange.hpp:32