OASIS
Open Algebra Software
Loading...
Searching...
No Matches
Add.hpp
Go to the documentation of this file.
1//
2// Created by Matthew McCall on 7/2/23.
3//
4
5#ifndef OASIS_ADD_HPP
6#define OASIS_ADD_HPP
7
9#include "Real.hpp"
10
11namespace Oasis {
12
14template <>
15class Add<
16 Expression, Expression> : public BinaryExpression<Add> {
17public:
19
20 [[nodiscard]] auto Integrate(const Expression& integrationVariable) const -> std::unique_ptr<Expression> final;
21
24};
26
137template <typename AugendT = Expression, typename AddendT = AugendT>
138class Add : public BinaryExpression<Add, AugendT, AddendT> {
139public:
140 Add() = default;
142 : BinaryExpression<Add, AugendT, AddendT>(other)
143 {
144 }
145
146 Add(const AugendT& addend1, const AddendT& addend2)
147 : BinaryExpression<Add, AugendT, AddendT>(addend1, addend2)
148 {
149 }
150
151 auto operator=(const Add& other) -> Add& = default;
152
155};
156
157} // namespace Oasis
158
159#endif // OASIS_ADD_HPP
#define EXPRESSION_CATEGORY(category)
Definition Expression.hpp:237
#define EXPRESSION_TYPE(type)
Definition Expression.hpp:226
The Add expression adds two expressions together.
Definition Add.hpp:138
Add()=default
Add(const Add< AugendT, AddendT > &other)
Definition Add.hpp:141
Add(const AugendT &addend1, const AddendT &addend2)
Definition Add.hpp:146
auto operator=(const Add &other) -> Add &=default
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
An expression.
Definition Expression.hpp:63
Definition Add.hpp:11
@ Commutative
Definition Expression.hpp:51
@ Associative
Definition Expression.hpp:50
@ BinExp
Definition Expression.hpp:52