Functions | |
| double | ApproxBinomial (int n, int k, double p) |
| double | ApproxLogFact (double x) |
| double | LogApproxBinomial (int n, int k, double p) |
| double | LogBinomFactor (int n, int k) |
| double | LogBreitWignerNonRel (double x, double mean, double Gamma, bool norm=false) |
| double | LogFact (int n) |
| double | LogGaus (double x, double mean=0, double sigma=1, bool norm=false) |
| double | LogNoverK (int n, int k) |
| double | LogPoisson (double x, double par) |
| double | Max (double x, double y) |
| int | Max (int x, int y) |
| double | Min (double x, double y) |
| int | Min (int x, int y) |
| int | Nint (double x) |
| double | rms (int n, const double *a) |
| double BCMath::ApproxBinomial | ( | int | n, | |
| int | k, | |||
| double | p | |||
| ) |
Calculates Binomial probability using approximations for factorial calculations if calculation for number greater than 100 required using the BCMath::ApproxLogFact function.
Definition at line 62 of file BCMath.cxx.
| double BCMath::ApproxLogFact | ( | double | x | ) |
Calculates natural logarithm of the n-factorial (n!) using approximation log(n!) = n*log(n) - n + .5*log(2*pi*n) -1/(12*x) if n > 100. If n<=100 it uses BCMath::LogFact to calculate it exactly.
Definition at line 120 of file BCMath.cxx.
| double BCMath::LogApproxBinomial | ( | int | n, | |
| int | k, | |||
| double | p | |||
| ) |
Calculates natural logarithm of the Binomial probability using approximations for factorial calculations if calculation for number greater than 100 required using the BCMath::ApproxLogFact function.
Definition at line 71 of file BCMath.cxx.
| double BCMath::LogBinomFactor | ( | int | n, | |
| int | k | |||
| ) |
Calculates natural logarithm of the Binomial factor "n over k" using approximations for factorial calculations if calculation for number greater than 100 required using the BCMath::ApproxLogFact function. Even for large numbers the calculation is performed precisely, if n-k < 5
Definition at line 89 of file BCMath.cxx.
| double BCMath::LogBreitWignerNonRel | ( | double | x, | |
| double | mean, | |||
| double | Gamma, | |||
| bool | norm = false | |||
| ) |
Definition at line 230 of file BCMath.cxx.
| double BCMath::LogFact | ( | int | n | ) |
Calculates natural logarithm of the n-factorial (n!)
Definition at line 134 of file BCMath.cxx.
| double BCMath::LogGaus | ( | double | x, | |
| double | mean = 0, |
|||
| double | sigma = 1, |
|||
| bool | norm = false | |||
| ) |
Calculate the natural logarithm of a gaussian function with mean and sigma. If norm=true (default is false) the result is multiplied by the normalization constant, i.e. divided by sqrt(2*Pi)*sigma.
Definition at line 16 of file BCMath.cxx.
| double BCMath::LogNoverK | ( | int | n, | |
| int | k | |||
| ) |
Calculates natural logarithm of the Binomial factor "n over k".
Definition at line 147 of file BCMath.cxx.
| double BCMath::LogPoisson | ( | double | x, | |
| double | par | |||
| ) |
Calculate the natural logarithm of a poisson distribution.
Definition at line 45 of file BCMath.cxx.
| int BCMath::Max | ( | int | x, | |
| int | y | |||
| ) | [inline] |
| int BCMath::Min | ( | int | x, | |
| int | y | |||
| ) | [inline] |
| int BCMath::Nint | ( | double | x | ) |
Returns the nearest integer of a double number.
Definition at line 177 of file BCMath.cxx.
| double BCMath::rms | ( | int | n, | |
| const double * | a | |||
| ) |
Returns the rms of an array.
Definition at line 206 of file BCMath.cxx.
1.5.6