Base class for math operations. More...
#include <XeMath.h>
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 | |
Base class for math operations.
| static double XeMath::computePolynomial | ( | double | x, | |
| int | n, | |||
| double * | coef | |||
| ) | [static] |
Compute polynomail in a efficient way.
| 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
| v | vector |
| static bool XeMath::equalizeVector | ( | double * | v, | |
| int | n | |||
| ) | [static] |
equalize a vector, set all its value equal, conserving the sum
| 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.
| 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.
| vin | input vector | |
| vout | output vector |
| static bool XeMath::normalizeVector | ( | vector< double > & | v | ) | [static] |
normalize a vector so that its sum is 1.
| 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.
| 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
| t | "t-value" |
| static double XeMath::vectorSum | ( | vector< double > & | v | ) | [static] |
compute the sum of a vector
| v | vector |
| static double XeMath::vectorSum | ( | double * | v, | |
| int | n | |||
| ) | [static] |
compute the sum of a vector
| v | pointer to input array | |
| n | number of elements |
1.6.1