OASIS
Open Algebra Software
Loading...
Searching...
No Matches
Divide.hpp
Go to the documentation of this file.
1//
2// Created by Matthew McCall on 8/10/23.
3//
4
5#ifndef OASIS_DIVIDE_HPP
6#define OASIS_DIVIDE_HPP
7
9
10namespace Oasis {
11
13template <>
14class Divide<Expression, Expression> : public BinaryExpression<Divide> {
15public:
16 Divide() = default;
17 Divide(const Divide<Expression, Expression>& other) = default;
18
19 Divide(const Expression& dividend, const Expression& divisor);
20
21 [[nodiscard]] auto Differentiate(const Expression& differentiationVariable) const -> std::unique_ptr<Expression> final;
22
23 [[nodiscard]] auto Integrate(const Expression& integrationVariable) const -> std::unique_ptr<Expression> final;
24
27};
29
114template <typename DividendT = Expression, typename DivisorT = DividendT>
115class Divide : public BinaryExpression<Divide, DividendT, DivisorT> {
116public:
117 Divide() = default;
119 : BinaryExpression<Divide, DividendT, DivisorT>(other)
120 {
121 }
122
123 Divide(const DividendT& addend1, const DivisorT& addend2)
124 : BinaryExpression<Divide, DividendT, DivisorT>(addend1, addend2)
125 {
126 }
127
128 auto operator=(const Divide& other) -> Divide& = default;
129
132};
133
134} // Oasis
135
136#endif // OASIS_DIVIDE_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 Divide expression divides two expressions.
Definition Divide.hpp:115
Divide(const Divide< DividendT, DivisorT > &other)
Definition Divide.hpp:118
Divide()=default
Divide(const DividendT &addend1, const DivisorT &addend2)
Definition Divide.hpp:123
auto operator=(const Divide &other) -> Divide &=default
Definition Add.hpp:11
@ BinExp
Definition Expression.hpp:52