5#ifndef OASIS_DERIVATIVE_HPP
6#define OASIS_DERIVATIVE_HPP
12template <IExpression Exp, IExpression Var>
17class Derivative<Expression, Expression> :
public BinaryExpression<Derivative> {
20 Derivative(
const Derivative<Expression, Expression>& other) =
default;
22 Derivative(
const Expression& Exp,
const Expression& Var);
24 [[nodiscard]]
auto Simplify() const ->
std::unique_ptr<Expression> final;
26 [[nodiscard]] auto
Differentiate(const Expression& differentiationVariable) const ->
std::unique_ptr<Expression> override;
66template <IExpression DependentT = Expression, IExpression IndependentT = DependentT>
75 Derivative(
const DependentT& exp,
const IndependentT& var)
#define EXPRESSION_CATEGORY(category)
Definition Expression.hpp:230
#define EXPRESSION_TYPE(type)
Definition Expression.hpp:219
A binary expression.
Definition BinaryExpression.hpp:82
auto Simplify() const -> std::unique_ptr< Expression > override
Simplifies this expression.
Definition BinaryExpression.hpp:203
auto Differentiate(const Expression &differentiationVariable) const -> std::unique_ptr< Expression > override
Tries to differentiate this function.
Definition BinaryExpression.hpp:131
The Derivative class template calculates the derivative of given expressions.
Definition Derivative.hpp:67
auto operator=(const Derivative &other) -> Derivative &=default
Derivative(const DependentT &exp, const IndependentT &var)
Definition Derivative.hpp:75
Derivative(const Derivative< DependentT, IndependentT > &other)
Definition Derivative.hpp:70
@ BinExp
Definition Expression.hpp:51