Alexandria 2.31.2
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
Functors.h
Go to the documentation of this file.
1
18
19#ifndef PYSTON_FUNCTORS_H
20#define PYSTON_FUNCTORS_H
21
22#include <cmath>
23
24namespace Pyston {
25
29template <typename T>
30struct Identity {
31 T operator()(T value) const {
32 return value;
33 }
34};
35
47template <typename R, typename T, R (*wrapped)(T)>
49 R operator()(T value) const {
50 return wrapped(value);
51 }
52};
53
65template <typename R, typename T, R (*wrapped)(T, T)>
67 R operator()(T left, T right) const {
68 return wrapped(left, right);
69 }
70};
71
73template <typename T>
75
77template <typename T>
79
81template <typename T>
83
85template <typename T>
87
89template <typename T>
91
93template <typename T>
95
97template <typename T>
99
101template <typename T>
103
105template <typename T>
107
109template <typename T>
111
113template <typename T>
115
117template <typename T>
119
121template <typename T>
123
125template <typename T>
127
129template <typename T>
131
133template <typename T>
135
137template <typename T>
139
141template <typename T>
143
145template <typename T>
147
149template <typename T>
151
153template <typename T>
155
157template <typename T>
159
161template <typename T>
163
164} // namespace Pyston
165
166#endif // PYSTON_FUNCTORS_H
UnaryWrapper< T, T, std::sqrt > Sqrt
Wraps the square root function.
Definition Functors.h:106
UnaryWrapper< T, T, std::atan > ArcTan
Wraps the arctan function.
Definition Functors.h:130
UnaryWrapper< T, T, std::exp2 > Exp2
Wraps the exponential, base 2, function.
Definition Functors.h:90
UnaryWrapper< T, T, std::asin > ArcSin
Wraps the arcsin function.
Definition Functors.h:122
UnaryWrapper< T, T, std::sin > Sin
Wraps the sin function.
Definition Functors.h:110
UnaryWrapper< T, T, std::acosh > ArcCosh
Wraps the hyperbolic arccos function.
Definition Functors.h:150
UnaryWrapper< T, T, std::atanh > ArcTanh
Wraps the hyperbolic arctan function.
Definition Functors.h:154
UnaryWrapper< T, T, std::cosh > Cosh
Wraps the hyperbolic cos function.
Definition Functors.h:138
UnaryWrapper< T, T, std::abs > Abs
Wraps the abs function.
Definition Functors.h:78
UnaryWrapper< T, T, std::tan > Tan
Wraps the tan function.
Definition Functors.h:118
UnaryWrapper< T, T, std::log2 > Log2
Wraps the log, base 2, function.
Definition Functors.h:98
UnaryWrapper< T, T, std::round > Round
Wraps the round function.
Definition Functors.h:82
UnaryWrapper< T, T, std::acos > ArcCos
Wraps the arcos function.
Definition Functors.h:126
UnaryWrapper< T, T, std::log > Log
Wraps the log function.
Definition Functors.h:94
UnaryWrapper< T, T, std::cos > Cos
Wraps the cos function.
Definition Functors.h:114
UnaryWrapper< T, T, std::sinh > Sinh
Wraps the hyperbolic sin function.
Definition Functors.h:134
BinaryWrapper< T, T, std::pow > Pow
Wraps the power function.
Definition Functors.h:74
UnaryWrapper< T, T, std::exp > Exp
Wraps the exponential function.
Definition Functors.h:86
BinaryWrapper< T, T, std::fmod > Fmod
Wraps fmod.
Definition Functors.h:162
UnaryWrapper< T, T, std::log10 > Log10
Wraps the log, base 10, function.
Definition Functors.h:102
BinaryWrapper< T, T, std::atan2 > ArcTan2
Wraps atan2.
Definition Functors.h:158
UnaryWrapper< T, T, std::tanh > Tanh
Wraps the hyperbolic tan function.
Definition Functors.h:142
UnaryWrapper< T, T, std::asinh > ArcSinh
Wraps the hyperbolic arcsin function.
Definition Functors.h:146
R operator()(T left, T right) const
Definition Functors.h:67
T operator()(T value) const
Definition Functors.h:31
R operator()(T value) const
Definition Functors.h:49