5#ifndef OASIS_SUBTRACT_HPP
6#define OASIS_SUBTRACT_HPP
13template <IExpression MinuendT, IExpression SubtrahendT>
18class Subtract<Expression, Expression> :
public BinaryExpression<Subtract> {
21 Subtract(
const Subtract<Expression, Expression>& other) =
default;
23 Subtract(
const Expression& minuend,
const Expression& subtrahend);
25 [[nodiscard]]
auto Simplify() const ->
std::unique_ptr<Expression> final;
27 [[nodiscard]] auto
Differentiate(const Expression& differentiationVariable) const ->
std::unique_ptr<Expression> final;
29 [[nodiscard]] auto
Integrate(const Expression& integrationVariable) const ->
std::unique_ptr<Expression> final;
42template <IExpression MinuendT = Expression, IExpression SubtrahendT = MinuendT>
51 Subtract(
const MinuendT& addend1,
const SubtrahendT& addend2)
#define EXPRESSION_CATEGORY(category)
Definition Expression.hpp:192
#define EXPRESSION_TYPE(type)
Definition Expression.hpp:181
A binary expression.
Definition BinaryExpression.hpp:79
auto Simplify() const -> std::unique_ptr< Expression > override
Simplifies this expression.
Definition BinaryExpression.hpp:200
auto Differentiate(const Expression &differentiationVariable) const -> std::unique_ptr< Expression > override
Tries to differentiate this function.
Definition BinaryExpression.hpp:128
auto Integrate(const Expression &integrationVariable) const -> std::unique_ptr< Expression > override
Attempts to integrate this expression using integration rules.
Definition BinaryExpression.hpp:205
The Subtract expression subtracts two expressions.
Definition Subtract.hpp:43
Subtract(const Subtract< MinuendT, SubtrahendT > &other)
Definition Subtract.hpp:46
Subtract(const MinuendT &addend1, const SubtrahendT &addend2)
Definition Subtract.hpp:51
auto operator=(const Subtract &other) -> Subtract &=default
@ BinExp
Definition Expression.hpp:45