21 #ifndef MATHFUNCTIONS_H_INCLUDED 22 #define MATHFUNCTIONS_H_INCLUDED 42 explicit Abs(
const Expr& t_argument);
45 ~
Abs(){ __record_data_alloc(static_cast<int>(
getType())); }
55 void print(
int mode=0,
56 std::ostream& out=std::cout,
57 bool lib =
false)
const override;
61 std::ostream &out = std::cout
64 std::string
printLaTeX(
int mode=0)
const override;
73 csl::eval::mode user_mode = csl::eval::base)
const override;
75 unique_Expr copy_unique()
const override;
77 Expr deepCopy()
const override;
79 Expr refresh()
const override;
81 Expr deepRefresh()
const override;
122 explicit Exp(
const Expr& t_argument);
125 ~
Exp(){ __record_data_alloc(static_cast<int>(
getType())); }
143 void print(
int mode=0,
144 std::ostream& out=std::cout,
145 bool lib =
false)
const override;
149 std::ostream &out = std::cout
152 std::string
printLaTeX(
int mode=0)
const override;
162 csl::eval::mode user_mode = csl::eval::base
165 unique_Expr copy_unique()
const override;
167 Expr deepCopy()
const override;
169 Expr refresh()
const override;
171 Expr deepRefresh()
const override;
178 std::optional<Expr>
expand(
bool full=
false,
179 bool inplace=
false)
const override;
182 std::function<
bool(
Expr const&)>
const& f,
184 bool inplace=
false)
const override;
214 explicit Log(
const Expr& t_argument);
217 ~
Log(){ __record_data_alloc(static_cast<int>(
getType())); }
235 void print(
int mode=0,
236 std::ostream& out=std::cout,
237 bool lib =
false)
const override;
241 std::ostream &out = std::cout
244 std::string
printLaTeX(
int mode=0)
const override;
254 csl::eval::mode user_mode = csl::eval::base
257 unique_Expr copy_unique()
const override;
259 Expr deepCopy()
const override;
261 Expr refresh()
const override;
263 Expr deepRefresh()
const override;
298 explicit Cos(
const Expr& t_argument);
301 ~
Cos(){ __record_data_alloc(static_cast<int>(
getType())); }
319 void print(
int mode=0,
320 std::ostream& out=std::cout,
321 bool lib =
false)
const override;
325 std::ostream &out = std::cout
328 std::string
printLaTeX(
int mode=0)
const override;
338 csl::eval::mode user_mode = csl::eval::base
341 unique_Expr copy_unique()
const override;
343 Expr deepCopy()
const override;
345 Expr refresh()
const override;
347 Expr deepRefresh()
const override;
384 explicit Sin(
const Expr& t_argument);
387 ~
Sin(){ __record_data_alloc(static_cast<int>(
getType())); }
405 void print(
int mode=0,
406 std::ostream& out=std::cout,
407 bool lib =
false)
const override;
411 std::ostream &out = std::cout
414 std::string
printLaTeX(
int mode=0)
const override;
424 csl::eval::mode user_mode = csl::eval::base
427 unique_Expr copy_unique()
const override;
429 Expr deepCopy()
const override;
431 Expr refresh()
const override;
433 Expr deepRefresh()
const override;
470 explicit Tan(
const Expr& t_argument);
473 ~
Tan(){ __record_data_alloc(static_cast<int>(
getType())); }
491 void print(
int mode=0,
492 std::ostream& out=std::cout,
493 bool lib =
false)
const override;
497 std::ostream &out = std::cout
500 std::string
printLaTeX(
int mode=0)
const override;
510 csl::eval::mode user_mode = csl::eval::base
513 unique_Expr copy_unique()
const override;
515 Expr deepCopy()
const override;
517 Expr refresh()
const override;
519 Expr deepRefresh()
const override;
556 explicit ACos(
const Expr& t_argument);
559 ~
ACos(){ __record_data_alloc(static_cast<int>(
getType())); }
577 void print(
int mode=0,
578 std::ostream& out=std::cout,
579 bool lib =
false)
const override;
583 std::ostream &out = std::cout
586 std::string
printLaTeX(
int mode=0)
const override;
596 csl::eval::mode user_mode = csl::eval::base
599 unique_Expr copy_unique()
const override;
601 Expr deepCopy()
const override;
603 Expr refresh()
const override;
605 Expr deepRefresh()
const override;
640 explicit ASin(
const Expr& t_argument);
643 ~
ASin(){ __record_data_alloc(static_cast<int>(
getType())); }
661 void print(
int mode=0,
662 std::ostream& out=std::cout,
663 bool lib =
false)
const override;
667 std::ostream &out = std::cout
670 std::string
printLaTeX(
int mode=0)
const override;
680 csl::eval::mode user_mode = csl::eval::base
683 unique_Expr copy_unique()
const override;
685 Expr deepCopy()
const override;
687 Expr refresh()
const override;
689 Expr deepRefresh()
const override;
725 explicit ATan(
const Expr& t_argument);
728 ~
ATan(){ __record_data_alloc(static_cast<int>(
getType())); }
738 void print(
int mode=0,
739 std::ostream& out=std::cout,
740 bool lib =
false)
const override;
744 std::ostream &out = std::cout
747 std::string
printLaTeX(
int mode=0)
const override;
757 csl::eval::mode user_mode = csl::eval::base
760 unique_Expr copy_unique()
const override;
762 Expr deepCopy()
const override;
764 Expr refresh()
const override;
766 Expr deepRefresh()
const override;
807 ~
Angle(){ __record_data_alloc(static_cast<int>(
getType())); }
817 void print(
int mode=0,
818 std::ostream& out=std::cout,
819 bool lib =
false)
const override;
823 std::ostream &out = std::cout
826 std::string
printLaTeX(
int mode=0)
const override;
839 csl::eval::mode user_mode = csl::eval::base)
const override;
841 unique_Expr copy_unique()
const override;
843 Expr deepCopy()
const override;
845 Expr refresh()
const override;
847 Expr deepRefresh()
const override;
878 explicit Cosh(
const Expr& t_argument);
881 ~
Cosh(){ __record_data_alloc(static_cast<int>(
getType())); }
899 void print(
int mode=0,
900 std::ostream& out=std::cout,
901 bool lib =
false)
const override;
905 std::ostream &out = std::cout
908 std::string
printLaTeX(
int mode=0)
const override;
918 csl::eval::mode user_mode = csl::eval::base
921 unique_Expr copy_unique()
const override;
923 Expr deepCopy()
const override;
925 Expr refresh()
const override;
927 Expr deepRefresh()
const override;
964 explicit Sinh(
const Expr& t_argument);
967 ~
Sinh(){ __record_data_alloc(static_cast<int>(
getType())); }
985 void print(
int mode=0,
986 std::ostream& out=std::cout,
987 bool lib =
false)
const override;
991 std::ostream &out = std::cout
994 std::string
printLaTeX(
int mode=0)
const override;
1004 csl::eval::mode user_mode = csl::eval::base
1007 unique_Expr copy_unique()
const override;
1009 Expr deepCopy()
const override;
1011 Expr refresh()
const override;
1013 Expr deepRefresh()
const override;
1050 explicit Tanh(
const Expr& t_argument);
1053 ~
Tanh(){ __record_data_alloc(static_cast<int>(
getType())); }
1071 void print(
int mode=0,
1072 std::ostream& out=std::cout,
1073 bool lib =
false)
const override;
1077 std::ostream &out = std::cout
1080 std::string
printLaTeX(
int mode=0)
const override;
1090 csl::eval::mode user_mode = csl::eval::base
1093 unique_Expr copy_unique()
const override;
1095 Expr deepCopy()
const override;
1097 Expr refresh()
const override;
1099 Expr deepRefresh()
const override;
1139 ~
ACosh(){ __record_data_alloc(static_cast<int>(
getType())); }
1149 void print(
int mode=0,
1150 std::ostream& out=std::cout,
1151 bool lib =
false)
const override;
1155 std::ostream &out = std::cout
1158 std::string
printLaTeX(
int mode=0)
const override;
1168 csl::eval::mode user_mode = csl::eval::base
1171 unique_Expr copy_unique()
const override;
1173 Expr deepCopy()
const override;
1175 Expr refresh()
const override;
1177 Expr deepRefresh()
const override;
1215 ~
ASinh(){ __record_data_alloc(static_cast<int>(
getType())); }
1225 void print(
int mode=0,
1226 std::ostream& out=std::cout,
1227 bool lib =
false)
const override;
1231 std::ostream &out = std::cout
1234 std::string
printLaTeX(
int mode=0)
const override;
1244 csl::eval::mode user_mode = csl::eval::base
1247 unique_Expr copy_unique()
const override;
1249 Expr deepCopy()
const override;
1251 Expr refresh()
const override;
1253 Expr deepRefresh()
const override;
1291 ~
ATanh(){ __record_data_alloc(static_cast<int>(
getType())); }
1301 void print(
int mode=0,
1302 std::ostream& out=std::cout,
1303 bool lib =
false)
const override;
1307 std::ostream &out = std::cout
1310 std::string
printLaTeX(
int mode=0)
const override;
1320 csl::eval::mode user_mode = csl::eval::base
1323 unique_Expr copy_unique()
const override;
1325 Expr deepCopy()
const override;
1327 Expr refresh()
const override;
1329 Expr deepRefresh()
const override;
1378 void print(
int mode=0,
1379 std::ostream& out=std::cout,
1380 bool lib =
false)
const override;
1384 std::ostream &out = std::cout
1387 std::string
printLaTeX(
int mode=0)
const override;
1395 csl::eval::mode user_mode = csl::eval::base
1405 unique_Expr copy_unique()
const override;
1407 Expr deepCopy()
const override;
1409 Expr refresh()
const override;
1411 Expr deepRefresh()
const override;
1422 Expr factorial_s(
const Expr& expr);
1448 unique_Expr copy_unique()
const override;
1450 Expr deepCopy()
const override;
1452 Expr refresh()
const override;
1454 Expr deepRefresh()
const override;
1464 void print(
int mode=0,
1465 std::ostream& out=std::cout,
1466 bool lib =
false)
const override;
1470 std::ostream &out = std::cout
1473 std::string
printLaTeX(
int mode=0)
const override;
1482 Expr applyDiracDelta(
const Expr& expr,
const Expr& variable)
const override;
1493 argument = t_argument;
1498 argument = t_argument;
1505 argument = t_argument;
1512 argument[0] = leftOperand;
1513 argument[1] = rightOperand;
1518 argument = t_argument;
1523 argument = t_argument;
1528 argument = t_argument;
1533 argument = t_argument;
1538 argument = t_argument;
1543 argument = t_argument;
1548 argument = t_argument;
1553 argument = t_argument;
1558 argument = t_argument;
1563 argument = t_argument;
1568 argument = t_argument;
1573 argument = t_argument;
1578 argument = t_argument;
csl::Type getType() const override
Gives the type of the cosh function.
Definition: mathFunctions.h:887
Expr cos_s(const Expr &expr)
Creates an object of type Cos acting on expr.
Definition: mathFunctions.cpp:532
long double evaluateScalar() const override
Evaluates the function on the argument.
Definition: mathFunctions.cpp:147
Expr cosh_s(const Expr &expr)
Creates an object of type Cosh acting on expr.
Definition: mathFunctions.cpp:1230
Expr acosh_s(const Expr &expr)
Creates an object of type ACosh acting on expr.
Definition: mathFunctions.cpp:1534
Angle()
Default constructor. Initializes both arguments to 0.
Definition: mathFunctions.h:1508
Namespace for csl library.
Definition: abreviation.h:34
Final specialization of AbstractFunc, the logarithm function.
Definition: mathFunctions.h:203
Final specialization of AbstractFunc, the tan function.
Definition: mathFunctions.h:459
csl::Type getType() const override
Gives the type of an Angle object.
Definition: mathFunctions.h:813
Handle functions of multiple arguments. In the case of the call of a simplification function...
Definition: scalarFunc.h:199
csl::Type getType() const override
Gives the type of the atanh function.
Definition: mathFunctions.h:1444
Log()
Default constructor. Initializes argument to 1.
Definition: mathFunctions.h:1501
void print(int mode=0, std::ostream &out=std::cout, bool lib=false) const override
Displays the abstract in standard output.
Definition: mathFunctions.cpp:101
Final specialization of AbstractFunc, the acosh function.
Definition: mathFunctions.h:1125
bool operator==(Expr_info expr) const override
Compares the Abstract with another.
Definition: scalarFunc.cpp:367
ATanh()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1571
csl::Type getType() const override
Gives the type of the acos function.
Definition: mathFunctions.h:565
Handles a angle of 2 arguments.
Definition: mathFunctions.h:790
Type
Enum of the different types of Abstract (i.e. list of all possible specializations).
Definition: enum.h:47
std::string printLaTeX(int mode=0) const override
Creates a LaTeX output for the Abstract.
Definition: mathFunctions.cpp:119
Exp()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1496
Base class for scalar functions of one argument.
Definition: scalarFunc.h:38
csl::Type getType() const override
Gives the type of the exponential function.
Definition: mathFunctions.h:131
Expr atan_s(const Expr &expr)
Creates an object of type ATan acting on expr.
Definition: mathFunctions.cpp:1127
Expr tanh_s(const Expr &expr)
Creates an object of type Tanh acting on expr.
Definition: mathFunctions.cpp:1460
Tan()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1526
Final specialization of AbstractFunc, the tanh function.
Definition: mathFunctions.h:1039
Factorial()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1576
ACos()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1546
std::optional< Expr > getComplexModulus() const override
Evaluates the modulus in the complex plane of the Abstract and returns it.
Definition: scalarFunc.cpp:110
csl::Type getType() const override
Gives the type of the atanh function.
Definition: mathFunctions.h:1297
std::optional< Expr > expand(bool full=false, bool inPlace=false) const override
Develops the Abstract.
Definition: scalarFunc.cpp:236
Expr argument
Argument of the considered function.
Definition: scalarFunc.h:42
Final specialization of AbstractFunc, the sinh function.
Definition: mathFunctions.h:953
Expr abs_s(const Expr &expr)
Creates an object of type Abs acting on expr.
Definition: mathFunctions.cpp:160
Expr asinh_s(const Expr &expr)
Creates an object of type ASinh acting on expr.
Definition: mathFunctions.cpp:1612
Final specialization of AbstractFunc, the asin function.
Definition: mathFunctions.h:629
ASin()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1551
Definition: librarydependency.h:33
Expr asin_s(const Expr &expr)
Creates an object of type ASin acting on expr.
Definition: mathFunctions.cpp:1053
Expr sin_s(const Expr &expr)
Creates an object of type Sin acting on expr.
Definition: mathFunctions.cpp:663
std::optional< Expr > evaluate(csl::eval::mode user_mode=csl::eval::base) const override
Evaluates the absolute value, return |argument|.
Definition: mathFunctions.cpp:137
csl::Type getType() const override
Gives the type of the tanh function.
Definition: mathFunctions.h:1059
Final specialization of AbstractFunc, the atanh function.
Definition: mathFunctions.h:1277
Expr exp_s(const Expr &expr)
Creates an object of type Exp acting on expr.
Definition: mathFunctions.cpp:310
virtual csl::vector_expr getAlternateForms() const
Calculates and returns all possible alternate forms of the expression in terms of simplifications...
Definition: abstract.cpp:1017
Final specialization of AbstractFunc, the sin function.
Definition: mathFunctions.h:373
Expr getImaginaryPart() const override
Evaluates the imaginary part of the Abstract and returns it.
Definition: scalarFunc.cpp:105
csl::Type getType() const override
Gives the type of the logarithm function.
Definition: mathFunctions.h:223
Final specialization of AbstractFunc, the asinh function.
Definition: mathFunctions.h:1201
virtual std::optional< Expr > expand_if(std::function< bool(Expr const &)> const &f, bool full=false, bool inPlace=false) const override
Develops the Abstract.
Definition: scalarFunc.cpp:250
Root class of the inheritance tree of abstracts.
Definition: abstract.h:76
csl::Type getType() const override
Gives the type of the sin function.
Definition: mathFunctions.h:393
Expr sinh_s(const Expr &expr)
Creates an object of type Sinh acting on expr.
Definition: mathFunctions.cpp:1333
Final specialization of AbstractFunc, the factorial function.
Definition: mathFunctions.h:1354
std::optional< Expr > derive(Expr_info expr) const override
Derives the abs function.
Definition: mathFunctions.cpp:154
Final specialization of AbstractFunc, the cos function.
Definition: mathFunctions.h:287
Final specialization of AbstractFunc, the abs function.
Definition: mathFunctions.h:31
csl::Type getType() const override
Gives the type of the abs funtion function.
Definition: mathFunctions.h:51
csl::Type getType() const override
Gives the type of the factorial function.
Definition: mathFunctions.h:1374
Base classes for scalar functions.
csl::Type getType() const override
Gives the type of the asin function.
Definition: mathFunctions.h:649
Final specialization of AbstractFunc, the cosh function.
Definition: mathFunctions.h:867
csl::Type getType() const override
Gives the type of the asinh function.
Definition: mathFunctions.h:1221
Final specialization of AbstractFunc, the exponential function.
Definition: mathFunctions.h:111
Expr tan_s(const Expr &expr)
Creates an object of type Tan acting on expr.
Definition: mathFunctions.cpp:813
Final specialization of AbstractFunc, the acos function.
Definition: mathFunctions.h:545
ACosh()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1561
csl::Type getType() const override
Gives the type of the tan function.
Definition: mathFunctions.h:479
Sinh()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1536
csl::Type getType() const override
Gives the type of the acosh function.
Definition: mathFunctions.h:1145
Expr atanh_s(const Expr &expr)
Creates an object of type ATanh acting on expr.
Definition: mathFunctions.cpp:1689
std::optional< Expr > getComplexArgument() const override
Evaluates the argument in the complex plane of the Abstract and returns it.
Definition: scalarFunc.cpp:116
Cos()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1516
Final specialization of AbstractFunc, the atan function.
Definition: mathFunctions.h:714
int getParity(Expr_info t_variable) const override
Returns the parity property of the expression with respect to t_variable.
Definition: mathFunctions.cpp:174
Tanh()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1541
Definition: mathFunctions.h:1424
ASinh()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1566
ATan()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1556
Expr acos_s(const Expr &expr)
Creates an object of type ACos acting on expr.
Definition: mathFunctions.cpp:946
csl::Type getType() const override
Gives the type of the cos function.
Definition: mathFunctions.h:307
csl::Type getType() const override
Gives the type of the sinh function.
Definition: mathFunctions.h:973
bool operator<(const Expr &a, const Expr &b)
see Abstract::operator<()
Definition: abstract.cpp:1423
std::optional< Expr > getRealPart() const override
Evaluates the real part of the Abstract and returns it.
Definition: scalarFunc.cpp:100
Abs()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1491
csl::Type getType() const override
Gives the type of the atan function.
Definition: mathFunctions.h:734
Expr log_s(const Expr &expr)
Creates an object of type Log acting on expr.
Definition: mathFunctions.cpp:423
Sin()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1521
Expression type/.
Definition: abstract.h:1573
Cosh()
Default constructor. Initializes argument to 0.
Definition: mathFunctions.h:1531