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 Integrate(const Expression& integrationVariable) const -> std::unique_ptr<Expression> final;
23
26};
28
81template <typename BaseT = Expression, typename PowerT = BaseT>
82class Exponent : public BinaryExpression<Exponent, BaseT, PowerT> {
83public:
84 Exponent() = default;
86 : BinaryExpression<Exponent, BaseT, PowerT>(other)
87 {
88 }
89
90 Exponent(const BaseT& base, const PowerT& power)
91 : BinaryExpression<Exponent, BaseT, PowerT>(base, power)
92 {
93 }
94
95 auto operator=(const Exponent& other) -> Exponent& = default;
96
99};
100
101}
102#endif // OASIS_EXPONENT_HPP
#define EXPRESSION_CATEGORY(category)
Definition Expression.hpp:237
#define EXPRESSION_TYPE(type)
Definition Expression.hpp:226
A binary expression.
Definition BinaryExpression.hpp:83
auto Integrate(const Expression &integrationVariable) const -> std::unique_ptr< Expression > override
Attempts to integrate this expression using integration rules.
Definition BinaryExpression.hpp:200
The exponent expression creates an exponent two expressions.
Definition Exponent.hpp:82
auto operator=(const Exponent &other) -> Exponent &=default
Exponent()=default
Exponent(const Exponent< BaseT, PowerT > &other)
Definition Exponent.hpp:85
Exponent(const BaseT &base, const PowerT &power)
Definition Exponent.hpp:90
Definition Add.hpp:11
@ BinExp
Definition Expression.hpp:52