8#ifndef BSPLINE_OPERATORS_COMPOUNDOPERATORS_H
9#define BSPLINE_OPERATORS_COMPOUNDOPERATORS_H
11#include <bspline/operators/GenericOperators.h>
20template <
typename O1,
typename O2,
21 std::enable_if_t<are_operators_v<O1, O2>,
bool> =
true>
45 return O1::outputOrder(O2::outputOrder(
inputOrder));
63 template <
typename T,
size_t size>
82template <
typename O1,
typename O2,
83 std::enable_if_t<are_operators_v<O1, O2>,
bool> =
true>
109template <AdditionOperation operation>
148 template <
typename T,
size_t sizea,
size_t sizeb>
149 static std::array<
T, std::max(
sizea,
sizeb)> &add(std::array<T, sizea> &
a,
150 std::array<T, sizeb> &
b) {
154 for (
size_t i = 0;
i <
sizeb;
i++) {
195 template <
typename T,
size_t size>
205 el *=
static_cast<T>(-1);
224template <
typename O1,
typename O2,
225 std::enable_if_t<are_operators_v<O1, O2>,
bool> =
true>
228 std::forward<O2>(
o2));
242template <
typename O1,
typename O2,
243 std::enable_if_t<are_operators_v<O1, O2>,
bool> =
true>
246 std::forward<O1>(
o1), std::forward<O2>(
o2));
Represents the product of two operators.
Definition CompoundOperators.h:22
std::array< T, outputOrder(size - 1)+1 > transform(const std::array< T, size > &input, const support::Grid< T > &grid, size_t intervalIndex) const
Applies operator to one interval.
Definition CompoundOperators.h:64
OperatorProduct(O1 o1, O2 o2)
Creates an OperatorProduct from two operators.
Definition CompoundOperators.h:36
static constexpr size_t outputOrder(size_t inputOrder)
Returns the order of the output spline for a given input order.
Definition CompoundOperators.h:44
Operator sum. Represents the sum or difference of two operators.
Definition CompoundOperators.h:128
OperatorSum(O1 o1, O2 o2)
Creates an OperatorSum from two operators.
Definition CompoundOperators.h:168
static constexpr size_t outputOrder(size_t inputOrder)
Returns the order of the output spline for a given input order.
Definition CompoundOperators.h:176
std::array< T, outputOrder(size - 1)+1 > transform(const std::array< T, size > &input, const support::Grid< T > &grid, size_t intervalIndex) const
Applies opertor to interval.
Definition CompoundOperators.h:196
Marker interface for operators.
Definition GenericOperators.h:23
Represents a global Grid.
Definition Grid.h:27
Operator definitions.
Definition CompoundOperators.h:13
auto operator-(O1 &&o1, O2 &&o2)
Operator difference.
Definition CompoundOperators.h:244
auto operator+(O1 &&o1, O2 &&o2)
Operator sum.
Definition CompoundOperators.h:226
constexpr bool is_valid_operation_v
Validates operation.
Definition CompoundOperators.h:110
OperatorProduct< O1, O2 > operator*(O1 &&o1, O2 &&o2)
Operator multiplication operator.
Definition CompoundOperators.h:84
AdditionOperation
Definition CompoundOperators.h:95