OASIS
Open Algebra Software
Loading...
Searching...
No Matches
Exponent.hpp
Go to the documentation of this file.
1//
2// Created by Andrew Nazareth on 9/19/23.
3//
4
5#ifndef OASIS_EXPONENT_HPP
6#define OASIS_EXPONENT_HPP
7
9#include "Variable.hpp"
10
11namespace Oasis {
12
14template <>
15class Exponent<Expression, Expression> : public BinaryExpression<Exponent> {
16public:
17 Exponent() = default;
18 Exponent(const Exponent<Expression, Expression>& other) = default;
19
20 Exponent(const Expression& base, const Expression& power);
21
22 [[nodiscard]] auto Differentiate(const Expression& differentiationVariable) const -> std::unique_ptr<Expression> final;
23
24 [[nodiscard]] auto Integrate(const Expression& integrationVariable) const -> std::unique_ptr<Expression> final;
25
28};
30
83template <typename BaseT = Expression, typename PowerT = BaseT>
84class Exponent : public BinaryExpression<Exponent, BaseT, PowerT> {
85public:
86 Exponent() = default;
88 : BinaryExpression<Exponent, BaseT, PowerT>(other)
89 {
90 }
91
92 Exponent(const BaseT& base, const PowerT& power)
93 : BinaryExpression<Exponent, BaseT, PowerT>(base, power)
94 {
95 }
96
97 auto operator=(const Exponent& other) -> Exponent& = default;
98
101};
102
103}
104#endif // OASIS_EXPONENT_HPP
#define EXPRESSION_CATEGORY(category)
Definition Expression.hpp:231
#define EXPRESSION_TYPE(type)
Definition Expression.hpp:220
A binary expression.
Definition BinaryExpression.hpp:83
auto Differentiate(const Expression &differentiationVariable) const -> std::unique_ptr< Expression > override
Tries to differentiate this function.
Definition BinaryExpression.hpp:132
auto Integrate(const Expression &integrationVariable) const -> std::unique_ptr< Expression > override
Attempts to integrate this expression using integration rules.
Definition BinaryExpression.hpp:204
The exponent expression creates an exponent two expressions.
Definition Exponent.hpp:84
auto operator=(const Exponent &other) -> Exponent &=default
Exponent()=default
Exponent(const Exponent< BaseT, PowerT > &other)
Definition Exponent.hpp:87
Exponent(const BaseT &base, const PowerT &power)
Definition Exponent.hpp:92
Definition Add.hpp:11
@ BinExp
Definition Expression.hpp:52