template<class LHS, class RHS>
Rodin::Variational::Sum class

Represents the sum operation.

Template parameters
LHS Type of left hand side operand
RHS Type of right hand side operand

Represents the following mathematical expression:

\[ \text{LHS} + \text{RHS} \]

which represents the usual arithmetic addition of two operands.

Range Deduction Rules

The rule for deducing the range of a Sum object, denoted $ \texttt{Range}[\text{LHS} + \text{RHS}]$ , is the following:

\[ \dfrac {\vdash \texttt{Range}[\text{LHS}] = \texttt{Range}[\text{RHS}] =: \texttt{R}} {\vdash \texttt{Range}[\text{LHS} + \text{RHS}] : \texttt{R}} \]

Function documentation

template<class LHS, class RHS> template<class LHSDerived, class RHSDerived>
auto operator+(const FunctionBase<LHSDerived>& lhs, const FunctionBase<RHSDerived>& rhs) constexpr

Addition operator for two functions.

Parameters
lhs Left operand function
rhs Right operand function
Returns Sum object

template<class LHS, class RHS> template<class LHSDerived>
auto operator+(const FunctionBase<LHSDerived>& lhs, Real rhs) constexpr

Addition of function and scalar.

Parameters
lhs Function operand
rhs Real scalar
Returns Sum object

template<class LHS, class RHS> template<class RHSDerived>
auto operator+(Real lhs, const FunctionBase<RHSDerived>& rhs) constexpr

Addition of scalar and function.

Parameters
lhs Real scalar
rhs Function operand
Returns Sum object

template<class LHS, class RHS> template<class LHSDerived>
auto operator+(const FunctionBase<LHSDerived>& lhs, Complex rhs) constexpr

Addition of function and complex scalar.

Parameters
lhs Function operand
rhs Complex scalar
Returns Sum object

template<class LHS, class RHS> template<class RHSDerived>
auto operator+(Complex lhs, const FunctionBase<RHSDerived>& rhs) constexpr

Addition of complex scalar and function.

Parameters
lhs Complex scalar
rhs Function operand
Returns Sum object