1#ifndef TATAMI_ISOMETRIC_UNARY_BOOLEAN_HELPERS_H
2#define TATAMI_ISOMETRIC_UNARY_BOOLEAN_HELPERS_H
4#include "../boolean_utils.hpp"
19template<
typename InputValue_,
typename Index_,
typename OutputValue_>
22 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
24 val =
static_cast<bool>(
val);
31template<
typename InputValue_,
typename Index_,
typename OutputValue_>
34 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
36 val = !
static_cast<bool>(
val);
43template<BooleanOperation op_,
typename InputValue_,
typename Index_,
typename OutputValue_>
45 if constexpr(
op_ == BooleanOperation::AND) {
51 }
else if constexpr(
op_ == BooleanOperation::OR) {
57 }
else if constexpr(
op_ == BooleanOperation::XOR) {
72template<BooleanOperation op_>
90template<BooleanOperation op_>
108 static constexpr bool is_basic =
false;
110 bool is_sparse()
const {
121 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
126 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
131 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
136 template<
typename OutputValue_,
typename InputValue_,
typename Index_>
159 static constexpr bool is_basic =
false;
161 bool is_sparse()
const {
174 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
179 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
184 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
189 template<
typename OutputValue_,
typename InputValue_,
typename Index_>
210 static constexpr bool is_basic =
false;
212 bool is_sparse()
const {
223 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
228 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
233 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
238 template<
typename OutputValue_,
typename InputValue_,
typename Index_>
257template<BooleanOperation op_,
typename Vector_>
268 for (
auto x : my_vector) {
279 bool my_sparse =
true;
285 static constexpr bool is_basic =
false;
287 bool zero_depends_on_row()
const {
291 bool zero_depends_on_column()
const {
295 bool non_zero_depends_on_row()
const {
299 bool non_zero_depends_on_column()
const {
303 bool is_sparse()
const {
314 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
316 if (
row == my_by_row) {
320 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
330 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
332 if (
row == my_by_row) {
337 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
347 template<
typename Index_,
typename InputValue_,
typename OutputValue_>
349 if (
row == my_by_row) {
353 if constexpr(std::is_same<InputValue_, OutputValue_>::value) {
363 template<
typename OutputValue_,
typename InputValue_,
typename Index_>
365 if (
row == my_by_row) {
429template<
typename Vector_>
441template<
typename Vector_>
453template<
typename Vector_>
465template<
typename Vector_>
Delayed unary isometric boolean cast.
Definition boolean_helpers.hpp:205
Delayed unary isometric boolean NOT operation.
Definition boolean_helpers.hpp:154
Delayed unary isometric scalar boolean operation.
Definition boolean_helpers.hpp:91
DelayedUnaryIsometricBooleanScalar(bool scalar)
Definition boolean_helpers.hpp:96
Delayed unary isometric vector boolean operations.
Definition boolean_helpers.hpp:258
DelayedUnaryIsometricBooleanVector(Vector_ vector, bool by_row)
Definition boolean_helpers.hpp:267
Flexible representations for matrix data.
Definition Extractor.hpp:15
DelayedUnaryIsometricBooleanScalar< BooleanOperation::AND > make_DelayedUnaryIsometricBooleanAndScalar(bool scalar)
Definition boolean_helpers.hpp:391
DelayedUnaryIsometricBooleanVector< BooleanOperation::OR, Vector_ > make_DelayedUnaryIsometricBooleanOrVector(Vector_ vector, bool by_row)
Definition boolean_helpers.hpp:442
DelayedUnaryIsometricBooleanScalar< BooleanOperation::OR > make_DelayedUnaryIsometricBooleanOrScalar(bool scalar)
Definition boolean_helpers.hpp:400
DelayedUnaryIsometricBooleanVector< BooleanOperation::EQUAL, Vector_ > make_DelayedUnaryIsometricBooleanEqualVector(Vector_ vector, bool by_row)
Definition boolean_helpers.hpp:466
DelayedUnaryIsometricBooleanVector< BooleanOperation::XOR, Vector_ > make_DelayedUnaryIsometricBooleanXorVector(Vector_ vector, bool by_row)
Definition boolean_helpers.hpp:454
DelayedUnaryIsometricBooleanNot make_DelayedUnaryIsometricBooleanNot()
Definition boolean_helpers.hpp:382
DelayedUnaryIsometricBooleanScalar< BooleanOperation::EQUAL > make_DelayedUnaryIsometricBooleanEqualScalar(bool scalar)
Definition boolean_helpers.hpp:418
DelayedUnaryIsometricBooleanScalar< BooleanOperation::XOR > make_DelayedUnaryIsometricBooleanXorScalar(bool scalar)
Definition boolean_helpers.hpp:409
DelayedUnaryIsometricBooleanVector< BooleanOperation::AND, Vector_ > make_DelayedUnaryIsometricBooleanAndVector(Vector_ vector, bool by_row)
Definition boolean_helpers.hpp:430
auto consecutive_extractor(const Matrix< Value_, Index_ > *mat, bool row, Index_ iter_start, Index_ iter_length, Args_ &&... args)
Definition consecutive_extractor.hpp:35