OASIS
Open Algebra Software
Loading...
Searching...
No Matches
Log.hpp
Go to the documentation of this file.
1//
2// Created by Matthew McCall on 10/6/23.
3//
4
5#ifndef OASIS_LOG_HPP
6#define OASIS_LOG_HPP
7
9#include "Real.hpp"
10
11namespace Oasis {
12
14template <>
15class Log<Expression, Expression> : public BinaryExpression<Log> {
16public:
17 Log() = default;
18 Log(const Log<Expression, Expression>& other) = default;
19
20 Log(const Expression& base, const Expression& argument);
21
22 [[deprecated]] [[nodiscard]] auto Simplify() const -> std::unique_ptr<Expression> final;
23
24 [[nodiscard]] auto Integrate(const Expression& integrationVariable) const -> std::unique_ptr<Expression> final;
25 [[nodiscard]] auto Differentiate(const Expression& differentiationVariable) const -> std::unique_ptr<Expression> final;
26
29};
31
38template <typename BaseT = Expression, typename ArgumentT = BaseT>
39class Log : public BinaryExpression<Log, BaseT, ArgumentT> {
40public:
41 Log() = default;
43 : BinaryExpression<Log, BaseT, ArgumentT>(other)
44 {
45 }
46
47 Log(const BaseT& base, const ArgumentT& argument)
48 : BinaryExpression<Log, BaseT, ArgumentT>(base, argument) { }
49
50 ;
51
52 auto operator=(const Log& other) -> Log& = default;
53
56};
57
58} // Oasis
59
60#endif // OASIS_LOG_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 > override
Simplifies this expression.
Definition BinaryExpression.hpp:204
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:215
The Log expression represents the logarithm of a base and an argument.
Definition Log.hpp:39
EXPRESSION_CATEGORY(BinExp)
auto operator=(const Log &other) -> Log &=default
Log(const Log< BaseT, ArgumentT > &other)
Definition Log.hpp:42
Log(const BaseT &base, const ArgumentT &argument)
Definition Log.hpp:47
EXPRESSION_TYPE(Log)
Log()=default
Definition Add.hpp:11
@ BinExp
Definition Expression.hpp:52