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 [[nodiscard]] auto Integrate(const Expression& integrationVariable) const -> std::unique_ptr<Expression> final;
23 [[nodiscard]] auto Differentiate(const Expression& differentiationVariable) const -> std::unique_ptr<Expression> final;
24
27};
29
36template <typename BaseT = Expression, typename ArgumentT = BaseT>
37class Log : public BinaryExpression<Log, BaseT, ArgumentT> {
38public:
39 Log() = default;
41 : BinaryExpression<Log, BaseT, ArgumentT>(other)
42 {
43 }
44
45 Log(const BaseT& base, const ArgumentT& argument)
46 : BinaryExpression<Log, BaseT, ArgumentT>(base, argument) { }
47
48 ;
49
50 auto operator=(const Log& other) -> Log& = default;
51
54};
55
56} // Oasis
57
58#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 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 Log expression represents the logarithm of a base and an argument.
Definition Log.hpp:37
EXPRESSION_CATEGORY(BinExp)
auto operator=(const Log &other) -> Log &=default
Log(const Log< BaseT, ArgumentT > &other)
Definition Log.hpp:40
Log(const BaseT &base, const ArgumentT &argument)
Definition Log.hpp:45
EXPRESSION_TYPE(Log)
Log()=default
Definition Add.hpp:11
@ BinExp
Definition Expression.hpp:52