XeMath Class Reference

Base class for math operations. More...

#include <XeMath.h>

Inheritance diagram for XeMath:
XeCore DetectorComponent integrable solvable SuhonenTable XeInterpolation XePhysics XeRange XeStat XeTolerance

List of all members.

Public Member Functions

 XeMath ()
 Void constructor for ROOT.
 ~XeMath ()
 Destructor.

Static Public Member Functions

static double computePolynomial (double x, int n, double *coef)
 Compute polynomail in a efficient way.
static bool equalizeVector (vector< double > &v)
 equalize a vector, set all its value equal, conserving the sum
static bool equalizeVector (double *v, int n)
 equalize a vector, set all its value equal, conserving the sum
static int indexInterval (double v, double vMin, double vMax, int nInter, bool log=false)
 Return the index of value in a interval.
static bool normalizeVector (vector< double > &vin, vector< double > &vout)
 normalize a vector so that its sum is 1.
static bool normalizeVector (vector< double > &v)
 normalize a vector so that its sum is 1.
static bool normalizeVector (double *vin, int n, double *vout=NULL)
 normalize a vector so that its sum is 1.
static bool printVector (vector< int > &v, string header="")
 print content of a vector of int with optional header
static bool printVector (int *v, int n, string header="")
 print content of a vector of int with optional header
static bool printVector (vector< double > &v, string header="")
 print content of a vector of double with optional header
static bool printVector (double *v, int n, string header="")
 print content of a vector of double with optional header
static string tValueName (double t)
 return name of a t-value
static double vectorSum (vector< double > &v)
 compute the sum of a vector
static double vectorSum (double *v, int n)
 compute the sum of a vector

Detailed Description

Base class for math operations.


Member Function Documentation

static double XeMath::computePolynomial ( double  x,
int  n,
double *  coef 
) [static]

Compute polynomail in a efficient way.

Parameters:
x value at which it's evaluated
n degree of a polynomial
coef array of n+1 coefficients
static bool XeMath::equalizeVector ( vector< double > &  v  )  [static]

equalize a vector, set all its value equal, conserving the sum

Parameters:
v vector
static bool XeMath::equalizeVector ( double *  v,
int  n 
) [static]

equalize a vector, set all its value equal, conserving the sum

Parameters:
v pointer to array
n number of elements
static int XeMath::indexInterval ( double  v,
double  vMin,
double  vMax,
int  nInter,
bool  log = false 
) [static]

Return the index of value in a interval.

Parameters:
v Value to be checked
vMin Lower edge of the interval
vMax Upper edge of the interval
nInterval number of intervals
log are we in log scale?
static bool XeMath::normalizeVector ( vector< double > &  vin,
vector< double > &  vout 
) [static]

normalize a vector so that its sum is 1.

Parameters:
vin input vector
vout output vector
static bool XeMath::normalizeVector ( vector< double > &  v  )  [static]

normalize a vector so that its sum is 1.

Parameters:
v vector (both input and output)
static bool XeMath::normalizeVector ( double *  vin,
int  n,
double *  vout = NULL 
) [static]

normalize a vector so that its sum is 1.

Parameters:
vin pointer to input array
n number of elements
vout pointer to output array; if NULL, will be replaced in place
static string XeMath::tValueName ( double  t  )  [static]

return name of a t-value

Parameters:
t "t-value"
static double XeMath::vectorSum ( vector< double > &  v  )  [static]

compute the sum of a vector

Parameters:
v vector
static double XeMath::vectorSum ( double *  v,
int  n 
) [static]

compute the sum of a vector

Parameters:
v pointer to input array
n number of elements

The documentation for this class was generated from the following file:
 All Classes Functions Variables

Generated on 10 Apr 2015 for Xephyr by  doxygen 1.6.1