4 #ifndef ROOT_Math_UnaryOperators 5 #define ROOT_Math_UnaryOperators 31 template <
class T,
unsigned int D>
class SVector;
32 template <
class T,
unsigned int D1,
unsigned int D2,
class R>
class SMatrix;
54 template <
class A,
class T,
unsigned int D>
72 template <
class T,
unsigned int D>
83 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
84 inline Expr<UnaryOp<Minus<T>,
Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
101 template <
class T,
unsigned int D,
unsigned int D2,
class R>
121 static inline T
apply(
const T& rhs) {
122 return std::abs(rhs);
129 template <
class A,
class T,
unsigned int D>
131 fabs(
const VecExpr<A,T,D>& rhs) {
147 template <
class T,
unsigned int D>
148 inline VecExpr<UnaryOp<Fabs<T>, SVector<T,D>, T>,
T, D>
149 fabs(
const SVector<T,D>& rhs) {
158 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
159 inline Expr<UnaryOp<Fabs<T>, Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
160 fabs(
const Expr<A,T,D,D2,R>& rhs) {
176 template <
class T,
unsigned int D,
unsigned int D2,
class R>
177 inline Expr<UnaryOp<Fabs<T>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
178 fabs(
const SMatrix<T,D,D2,R>& rhs) {
196 static inline T
apply(
const T& rhs) {
204 template <
class A,
class T,
unsigned int D>
206 sqr(
const VecExpr<A,T,D>& rhs) {
222 template <
class T,
unsigned int D>
223 inline VecExpr<UnaryOp<Sqr<T>, SVector<T,D>, T>,
T, D>
224 sqr(
const SVector<T,D>& rhs) {
233 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
234 inline Expr<UnaryOp<Sqr<T>, Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
235 sqr(
const Expr<A,T,D,D2,R>& rhs) {
251 template <
class T,
unsigned int D,
unsigned int D2,
class R>
252 inline Expr<UnaryOp<Sqr<T>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
253 sqr(
const SMatrix<T,D,D2,R>& rhs) {
271 static inline T
apply(
const T& rhs) {
279 template <
class A,
class T,
unsigned int D>
281 sqrt(
const VecExpr<A,T,D>& rhs) {
297 template <
class T,
unsigned int D>
298 inline VecExpr<UnaryOp<Sqrt<T>, SVector<T,D>, T>,
T, D>
299 sqrt(
const SVector<T,D>& rhs) {
308 template <
class A,
class T,
unsigned int D,
unsigned int D2,
class R>
309 inline Expr<UnaryOp<Sqrt<T>, Expr<A,T,D,D2,R>, T>,
T, D, D2,
R>
310 sqrt(
const Expr<A,T,D,D2,R>& rhs) {
325 template <
class T,
unsigned int D,
unsigned int D2,
class R>
326 inline Expr<UnaryOp<Sqrt<T>, SMatrix<T,D,D2,R>, T>,
T, D, D2,
R>
327 sqrt(
const SMatrix<T,D,D2,R>& rhs) {
static T apply(const T &rhs)
Namespace for new ROOT classes and functions.
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.