5#ifndef OASIS_EXPONENT_HPP
6#define OASIS_EXPONENT_HPP
13template <IExpression BaseT, IExpression PowerT>
18class Exponent<Expression, Expression> :
public BinaryExpression<Exponent> {
21 Exponent(
const Exponent<Expression, Expression>& other) =
default;
23 Exponent(
const Expression& base,
const Expression& power);
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 BaseT = Expression, IExpression PowerT = BaseT>
51 Exponent(
const BaseT& base,
const PowerT& power)
#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 exponent expression creates an exponent two expressions.
Definition Exponent.hpp:43
auto operator=(const Exponent &other) -> Exponent &=default
Exponent(const Exponent< BaseT, PowerT > &other)
Definition Exponent.hpp:46
Exponent(const BaseT &base, const PowerT &power)
Definition Exponent.hpp:51
@ BinExp
Definition Expression.hpp:45