1#ifndef TATAMI_ISOMETRIC_UNARY_SUBSTITUTE_HELPERS_H
2#define TATAMI_ISOMETRIC_UNARY_SUBSTITUTE_HELPERS_H
4#include "../compare_utils.hpp"
19template<CompareOperation op_,
typename Value_>
24template<CompareOperation op_,
typename Value_>
31template<CompareOperation op_,
typename Value_,
typename Index_>
52template<CompareOperation op_,
typename Value_>
65 Value_ my_compared, my_substitute;
72 static constexpr bool is_basic =
false;
74 bool is_sparse()
const {
85 template<
typename Index_>
90 template<
typename Index_>
95 template<
typename Index_>
100 template<
typename,
typename,
typename Index_>
105 return my_substitute;
124template<CompareOperation op_,
typename Value_,
typename Vector_>
140 for (
size_t i = 0, end = my_compared.size();
i < end; ++
i) {
149 Vector_ my_compared, my_substitute;
151 bool my_sparse =
true;
157 static constexpr bool is_basic =
false;
159 bool zero_depends_on_row()
const {
163 bool zero_depends_on_column()
const {
167 bool non_zero_depends_on_row()
const {
171 bool non_zero_depends_on_column()
const {
175 bool is_sparse()
const {
186 template<
typename Index_>
188 if (
row == my_by_row) {
198 template<
typename Index_>
200 if (
row == my_by_row) {
211 template<
typename Index_>
213 if (
row == my_by_row) {
223 template<
typename,
typename,
typename Index_>
225 if (
row == my_by_row) {
226 auto sub = my_substitute[
idx];
250template<
typename Value_ =
double>
264template<
typename Value_ =
double>
278template<
typename Value_ =
double>
292template<
typename Value_ =
double>
306template<
typename Value_ =
double>
320template<
typename Value_ =
double>
336template<
typename Value_ =
double,
typename Vector_ = std::vector<Value_> >
352template<
typename Value_ =
double,
typename Vector_ = std::vector<Value_> >
368template<
typename Value_ =
double,
typename Vector_ = std::vector<Value_> >
384template<
typename Value_ =
double,
typename Vector_ = std::vector<Value_> >
400template<
typename Value_ =
double,
typename Vector_ = std::vector<Value_> >
416template<
typename Value_ =
double,
typename Vector_ = std::vector<Value_> >
426template<SpecialCompareOperation op_,
bool pass_,
typename Value_>
431template<SpecialCompareOperation op_,
bool pass_,
typename Value_>
438template<SpecialCompareOperation op_,
bool pass_,
typename Value_,
typename Index_>
459template<SpecialCompareOperation op_,
bool pass_,
typename Value_>
477 static constexpr bool is_basic =
false;
479 bool is_sparse()
const {
490 template<
typename Index_>
495 template<
typename Index_>
500 template<
typename Index_>
505 template<
typename,
typename,
typename Index_>
510 return my_substitute;
525template<
bool pass_ = true,
typename Value_ =
double>
537template<
bool pass_ = true,
typename Value_ =
double>
549template<
bool pass_ = true,
typename Value_ =
double>
Delayed special value substitution.
Definition substitute_helpers.hpp:460
DelayedUnaryIsometricSpecialSubstitute(Value_ substitute)
Definition substitute_helpers.hpp:465
Delayed scalar substitution.
Definition substitute_helpers.hpp:53
DelayedUnaryIsometricSubstituteScalar(Value_ compared, Value_ substitute)
Definition substitute_helpers.hpp:60
Delayed vector comparisons.
Definition substitute_helpers.hpp:125
DelayedUnaryIsometricSubstituteVector(Vector_ compared, Vector_ substitute, bool by_row)
Definition substitute_helpers.hpp:137
Flexible representations for matrix data.
Definition Extractor.hpp:15
DelayedUnaryIsometricSubstituteScalar< CompareOperation::LESS_THAN, Value_ > make_DelayedUnaryIsometricSubstituteLessThanScalar(Value_ compared, Value_ substitute)
Definition substitute_helpers.hpp:280
DelayedUnaryIsometricSubstituteVector< CompareOperation::LESS_THAN, Value_, Vector_ > make_DelayedUnaryIsometricSubstituteLessThanVector(Vector_ compared, Vector_ substitute, bool by_row)
Definition substitute_helpers.hpp:370
DelayedUnaryIsometricSubstituteVector< CompareOperation::LESS_THAN_OR_EQUAL, Value_, Vector_ > make_DelayedUnaryIsometricSubstituteLessThanOrEqualVector(Vector_ compared, Vector_ substitute, bool by_row)
Definition substitute_helpers.hpp:402
DelayedUnaryIsometricSubstituteScalar< CompareOperation::EQUAL, Value_ > make_DelayedUnaryIsometricSubstituteEqualScalar(Value_ compared, Value_ substitute)
Definition substitute_helpers.hpp:252
DelayedUnaryIsometricSubstituteScalar< CompareOperation::GREATER_THAN, Value_ > make_DelayedUnaryIsometricSubstituteGreaterThanScalar(Value_ compared, Value_ substitute)
Definition substitute_helpers.hpp:266
DelayedUnaryIsometricSpecialSubstitute< SpecialCompareOperation::ISNAN, pass_, Value_ > make_DelayedUnaryIsometricSubstituteIsnan(Value_ substitute)
Definition substitute_helpers.hpp:526
DelayedUnaryIsometricSubstituteScalar< CompareOperation::NOT_EQUAL, Value_ > make_DelayedUnaryIsometricSubstituteNotEqualScalar(Value_ compared, Value_ substitute)
Definition substitute_helpers.hpp:322
DelayedUnaryIsometricSubstituteVector< CompareOperation::GREATER_THAN, Value_, Vector_ > make_DelayedUnaryIsometricSubstituteGreaterThanVector(Vector_ compared, Vector_ substitute, bool by_row)
Definition substitute_helpers.hpp:354
DelayedUnaryIsometricSpecialSubstitute< SpecialCompareOperation::ISFINITE, pass_, Value_ > make_DelayedUnaryIsometricSubstituteIsfinite(Value_ substitute)
Definition substitute_helpers.hpp:550
DelayedUnaryIsometricSubstituteVector< CompareOperation::EQUAL, Value_, Vector_ > make_DelayedUnaryIsometricSubstituteEqualVector(Vector_ compared, Vector_ substitute, bool by_row)
Definition substitute_helpers.hpp:338
DelayedUnaryIsometricSpecialSubstitute< SpecialCompareOperation::ISINF, pass_, Value_ > make_DelayedUnaryIsometricSubstituteIsinf(Value_ substitute)
Definition substitute_helpers.hpp:538
DelayedUnaryIsometricSubstituteScalar< CompareOperation::LESS_THAN_OR_EQUAL, Value_ > make_DelayedUnaryIsometricSubstituteLessThanOrEqualScalar(Value_ compared, Value_ substitute)
Definition substitute_helpers.hpp:308
DelayedUnaryIsometricSubstituteScalar< CompareOperation::GREATER_THAN_OR_EQUAL, Value_ > make_DelayedUnaryIsometricSubstituteGreaterThanOrEqualScalar(Value_ compared, Value_ substitute)
Definition substitute_helpers.hpp:294
DelayedUnaryIsometricSubstituteVector< CompareOperation::NOT_EQUAL, Value_, Vector_ > make_DelayedUnaryIsometricSubstituteNotEqualVector(Vector_ compared, Vector_ substitute, bool by_row)
Definition substitute_helpers.hpp:418
DelayedUnaryIsometricSubstituteVector< CompareOperation::GREATER_THAN_OR_EQUAL, Value_, Vector_ > make_DelayedUnaryIsometricSubstituteGreaterThanOrEqualVector(Vector_ compared, Vector_ substitute, bool by_row)
Definition substitute_helpers.hpp:386
auto consecutive_extractor(const Matrix< Value_, Index_ > *mat, bool row, Index_ iter_start, Index_ iter_length, Args_ &&... args)
Definition consecutive_extractor.hpp:35