OASIS
Open Algebra Software
Loading...
Searching...
No Matches
Integral.hpp
Go to the documentation of this file.
1//
2// Created by Levy Lin on 2/09/2024.
3//
4
5#ifndef OASIS_INTEGRATE_HPP
6#define OASIS_INTEGRATE_HPP
7
9#include "Expression.hpp"
10#include "Real.hpp"
11
12namespace Oasis {
13
15template <>
16class Integral<Expression, Expression> : public BinaryExpression<Integral> {
17public:
18 Integral() = default;
19 Integral(const Integral<Expression, Expression>& other) = default;
20
21 Integral(const Expression& integrand, const Expression& differential);
22
23 [[deprecated]] [[nodiscard]] auto Simplify(const Expression& upper, const Expression& lower) const -> std::unique_ptr<Expression> /* final */;
24
27};
29
58template <typename IntegrandT = Expression, typename DifferentialT = IntegrandT>
59class Integral : public BinaryExpression<Integral, IntegrandT, DifferentialT> {
60public:
61 Integral() = default;
63 : BinaryExpression<Integral, IntegrandT, DifferentialT>(other)
64 {
65 }
66
67 Integral(const IntegrandT& integrand, const DifferentialT& differential)
68 : BinaryExpression<Integral, IntegrandT, DifferentialT>(integrand, differential)
69 {
70 }
71
72 auto operator=(const Integral& other) -> Integral& = default;
73
76};
77
78} // namespace Oasis
79
80#endif // OASIS_INTEGRATE_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 Simplify() const -> std::unique_ptr< Expression >
Simplifies this expression.
Definition Expression.cpp:254
The Integral expression integrates the two expressions together.
Definition Integral.hpp:59
Integral(const Integral< IntegrandT, DifferentialT > &other)
Definition Integral.hpp:62
Integral()=default
Integral(const IntegrandT &integrand, const DifferentialT &differential)
Definition Integral.hpp:67
auto operator=(const Integral &other) -> Integral &=default
Definition Add.hpp:11
@ Commutative
Definition Expression.hpp:51
@ Associative
Definition Expression.hpp:50