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 Integrate(const Expression& integrationVariable) const -> std::unique_ptr<Expression> final;
22
25};
27
112template <typename DividendT = Expression, typename DivisorT = DividendT>
113class Divide : public BinaryExpression<Divide, DividendT, DivisorT> {
114public:
115 Divide() = default;
117 : BinaryExpression<Divide, DividendT, DivisorT>(other)
118 {
119 }
120
121 Divide(const DividendT& addend1, const DivisorT& addend2)
122 : BinaryExpression<Divide, DividendT, DivisorT>(addend1, addend2)
123 {
124 }
125
126 auto operator=(const Divide& other) -> Divide& = default;
127
130};
131
132} // Oasis
133
134#endif // OASIS_DIVIDE_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 Divide expression divides two expressions.
Definition Divide.hpp:113
Divide(const Divide< DividendT, DivisorT > &other)
Definition Divide.hpp:116
Divide()=default
Divide(const DividendT &addend1, const DivisorT &addend2)
Definition Divide.hpp:121
auto operator=(const Divide &other) -> Divide &=default
Definition Add.hpp:11
@ BinExp
Definition Expression.hpp:52