4 #ifndef ROOT_Math_UnaryOperators 5 #define ROOT_Math_UnaryOperators 23 #ifndef ROOT_Math_Expression 33 template <
class T,
unsigned int D>
class SVector;
34 template <
class T,
unsigned int D1,
unsigned int D2,
class R>
class SMatrix;
56 template <
class A,
class T,
unsigned int D>
74 template <
class T,
unsigned int D>
85 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
86 inline Expr<UnaryOp<Minus<T>,
Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
103 template <
class T,
unsigned int D,
unsigned int D2,
class R>
123 static inline T
apply(
const T& rhs) {
124 return std::abs(rhs);
131 template <
class A,
class T,
unsigned int D>
133 fabs(
const VecExpr<A,T,D>& rhs) {
149 template <
class T,
unsigned int D>
150 inline VecExpr<UnaryOp<Fabs<T>, SVector<T,D>, T>,
T, D>
151 fabs(
const SVector<T,D>& rhs) {
160 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
161 inline Expr<UnaryOp<Fabs<T>, Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
162 fabs(
const Expr<A,T,D,D2,R>& rhs) {
178 template <
class T,
unsigned int D,
unsigned int D2,
class R>
179 inline Expr<UnaryOp<Fabs<T>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
180 fabs(
const SMatrix<T,D,D2,R>& rhs) {
198 static inline T
apply(
const T& rhs) {
206 template <
class A,
class T,
unsigned int D>
208 sqr(
const VecExpr<A,T,D>& rhs) {
224 template <
class T,
unsigned int D>
225 inline VecExpr<UnaryOp<Sqr<T>, SVector<T,D>, T>,
T, D>
226 sqr(
const SVector<T,D>& rhs) {
235 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
236 inline Expr<UnaryOp<Sqr<T>, Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
237 sqr(
const Expr<A,T,D,D2,R>& rhs) {
253 template <
class T,
unsigned int D,
unsigned int D2,
class R>
254 inline Expr<UnaryOp<Sqr<T>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
255 sqr(
const SMatrix<T,D,D2,R>& rhs) {
273 static inline T
apply(
const T& rhs) {
281 template <
class A,
class T,
unsigned int D>
283 sqrt(
const VecExpr<A,T,D>& rhs) {
299 template <
class T,
unsigned int D>
300 inline VecExpr<UnaryOp<Sqrt<T>, SVector<T,D>, T>,
T, D>
301 sqrt(
const SVector<T,D>& rhs) {
310 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
311 inline Expr<UnaryOp<Sqrt<T>, Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
312 sqrt(
const Expr<A,T,D,D2,R>& rhs) {
327 template <
class T,
unsigned int D,
unsigned int D2,
class R>
328 inline Expr<UnaryOp<Sqrt<T>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
329 sqrt(
const SMatrix<T,D,D2,R>& rhs) {
static T apply(const T &rhs)
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Unary Square Operation Class.
Unary abs Operation Class.
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
DisplacementVector2D< CoordSystem1, U > operator-(DisplacementVector2D< CoordSystem1, U > v1, DisplacementVector2D< CoordSystem2, U > const &v2)
Difference between two DisplacementVector2D vectors.
SMatrix: a generic fixed size D1 x D2 Matrix class.
Unary Square Root Operation Class.
Unary Minus Operation Class.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static T apply(const T &rhs)
UnaryOperation class A class representing unary operators in the parse tree.
Namespace for new Math classes and functions.
static T apply(const T &rhs)
Expression wrapper class for Vector objects.
VecExpr< UnaryOp< Sqr< T >, VecExpr< A, T, D >, T >, T, D > sqr(const VecExpr< A, T, D > &rhs)
static T apply(const T &rhs)
SVector: a generic fixed size Vector class.