Classes | Files | Enumerations | Functions
Collaboration diagram for Math:

Classes

class  utl::AdaptiveRK5Iterator< DerivativeFunctor, VectorType, ErrorScalingPolicy >
 
class  utl::BinomialCoefficients
 Calculates binomial coefficients and caches the results. More...
 
class  utl::Function
 Evaluate functions given in a string. The real work is done by the ExpressionParser class. More...
 
class  utl::Integrator< Functor >
 Class for integration of functions with one independent parameter. More...
 
class  fwk::RandomEngineRegistry::InvalidRandomEngineException
 Base class for exceptions in the RandomEngineRegistry. More...
 
class  utl::MultiTabulatedFunction
 A collection of TabulatedFunction. More...
 
class  utl::RandomEngine
 Wraps the random number engine used to generate distributions. More...
 
class  fwk::RandomEngineRegistry
 Collection of pre-defined random engines. More...
 
class  utl::RandomSamplerFromCDF
 
class  utl::RandomSamplerFromPDF
 
class  utl::RK4Iterator< DerivativeFunctor, VectorType >
 
class  utl::RK4ODEIntegrator< DerivativeFunctor >
 
class  utl::RK5Iterator< DerivativeFunctor, VectorType >
 
class  utl::RK5ODEIntegrator< DerivativeFunctor >
 
class  utl::SMatrix< n, m, T >
 Static (small and dense) matrix class. More...
 
class  utl::SparseMatrix< T >
 Sparse container class for matrix data. More...
 
class  utl::SparseVector< T >
 Sparse container class for vectorial data. More...
 
class  utl::SVector< n, T >
 Static (small and dense) vector class. More...
 
class  utl::TabulatedFunction
 Class to hold collection (x,y) points and provide interpolation between them. More...
 
class  utl::TabulatedFunctionComplexLgAmpPhase
 Class to hold collection (x,y) points and provide interpolation between them, where y are complex numbers. More...
 
class  utl::VRandomSampler
 Class to shoot random numbers given by a user-defined distribution function. More...
 

Files

file  ComplexLgAmpPhase.h
 
file  MathConstants.h
 Mathematical constants.
 

Enumerations

enum  utl::Spline::Type { utl::Spline::eNatural = NATURAL, utl::Spline::ePeriodic = PERIODIC, utl::Spline::eFirstDerivative = DERIV1, utl::Spline::eSecondDerivative = DERIV2 }
 

Functions

double utl::BetaCF (const double a, const double b, const double x)
 BetaCF. More...
 
double utl::Fermi (const double x, const double x0, const double sigma)
 Fermi function. More...
 
double utl::IncompleteBeta (const double a, const double b, const double x)
 Incomplete Beta function. More...
 
double utl::IncompleteGammaP (const double a, const double x)
 Incomplete gamma P(a, x) function. More...
 
double utl::IncompleteGammaPCF (const double a, const double x)
 Continued Fraction for incomplete gamma function Q(a, x) More...
 
double utl::IncompleteGammaPSeries (const double a, const double x)
 logarithm of Gamma function More...
 
double utl::IncompleteGammaQ (const double a, const double x)
 Incomplete gamma Q(a, x) = 1 - P(a, x) function. More...
 
template<int branch>
double utl::InverseMoyal (const double y, const double eps=1e-6)
 Inverse of the Moyal function. More...
 
template<int branch>
double utl::InverseMoyalApproximation (const double y)
 
template<int branch>
double utl::InverseMoyalBranchPointExpansion (const double y)
 
double utl::InverseNormalCDF (const double p)
 Inverse of the comulative normal distribution. Taken from http://home.online.no/~pjacklam/notes/invnorm/ The algorithm has never been published in a journal. The accuracy is more than 15 decimal places. More...
 
double utl::KolmogorovProbability (const int n, const double kolmogorovDistance)
 
template<int branch>
double utl::LambertW (const double x)
 
template<int branch>
double utl::LambertWApproximation (const double x)
 
double utl::LogGamma (const double x)
 
double utl::Moyal (const double x)
 Moyal function. More...
 
double utl::PolynomialInterpolation (const unsigned int n, const double px[], const double py[], const double x, double &dy)
 Perform polynomial interpolation or extrapolation. More...
 
double utl::PolynomialInterpolation (const unsigned int n, const double px[], const double py[], const double x)
 Perform polynomial interpolation or extrapolation with approximation control. More...
 

Detailed Description

Enumeration Type Documentation

Perform interpolation with B-splines on a regular grid in 1,2,3 dimensions. These are thin wrappers over the einspline library.

Author
Hans Dembinski
Date
Nov 2010
Enumerator
eNatural 
ePeriodic 
eFirstDerivative 
eSecondDerivative 

Definition at line 53 of file SplineInterpolatorEinspline.h.

Function Documentation

double utl::BetaCF ( const double  a,
const double  b,
const double  x 
)

BetaCF.

Used by incompleteBeta: Evaluates continued fraction for incomplete beta function by modified Lentz's method. Taken from Numerical Recipes in C.

Definition at line 143 of file Utilities/Math/Math.cc.

References RdGeoCeLDFFitter::b, RdGeoCeLDFFitter::c, eps, ERROR, utl::m, and utl::m2.

Referenced by utl::IncompleteBeta().

double utl::Fermi ( const double  x,
const double  x0,
const double  sigma 
)
inline

Fermi function.

utl_Fermi.png

Fermi function is defined as

\[ {\rm F}(x) = \frac1{1+\exp\left(\frac{x-x_0}\sigma\right)} \]

ie one for x << x0.

Author
Darko Veberic

Definition at line 240 of file Utilities/Math/Math.h.

double utl::IncompleteBeta ( const double  a,
const double  b,
const double  x 
)

Incomplete Beta function.

\[ {\rm I}_x(a,b) = \frac{{\rm B}_x(a,b)}{{\rm B}(a,b)} = \frac{1}{{\rm B}(a,b)}\int_0^xt^{a-1}(1-t)^{b-1}\,{\rm d}t \]

taken from Numerical Recipes in C

Definition at line 207 of file Utilities/Math/Math.cc.

References RdGeoCeLDFFitter::a, RdGeoCeLDFFitter::b, utl::BetaCF(), ERROR, and utl::LogGamma().

Referenced by ShowerPhotonGeneratorOG::ShowerPhotonGenerator::NKGFunction().

double utl::IncompleteGammaP ( const double  a,
const double  x 
)
inline

Incomplete gamma P(a, x) function.

Taken from Numerical Recipes in C

Definition at line 188 of file Utilities/Math/Math.h.

References utl::IncompleteGammaPCF(), and utl::IncompleteGammaPSeries().

double utl::IncompleteGammaPCF ( const double  a,
const double  x 
)

Continued Fraction for incomplete gamma function Q(a, x)

Taken from Numerical Recipes in C

Definition at line 92 of file Utilities/Math/Math.cc.

References RdGeoCeLDFFitter::a, RdGeoCeLDFFitter::b, RdGeoCeLDFFitter::c, eps, ERROR, and utl::LogGamma().

Referenced by utl::IncompleteGammaP(), and utl::IncompleteGammaQ().

double utl::IncompleteGammaPSeries ( const double  a,
const double  x 
)

logarithm of Gamma function

For x > 0, using the Lanczos approximation. Series representation of Incomplete gamma function P(a, x)

Taken from Numerical Recipes in C

Definition at line 55 of file Utilities/Math/Math.cc.

References RdGeoCeLDFFitter::a, eps, ERROR, and utl::LogGamma().

Referenced by utl::IncompleteGammaP(), and utl::IncompleteGammaQ().

double utl::IncompleteGammaQ ( const double  a,
const double  x 
)
inline

Incomplete gamma Q(a, x) = 1 - P(a, x) function.

Taken from Numerical Recipes in C

Definition at line 205 of file Utilities/Math/Math.h.

References utl::IncompleteGammaPCF(), and utl::IncompleteGammaPSeries().

Referenced by utl::Chi2Probability().

template<int branch>
double utl::InverseMoyal ( const double  y,
const double  epsilon 
)

Inverse of the Moyal function.

Inverse of the Moyal function

The inverse is obtained with the Newton-Raphson (tangent) iteration.

Author
Darko Veberic
Date
25 Mar 2007
utl_InverseMoyal.png
Author
Darko Veberic

Definition at line 51 of file Moyal.cc.

References eps, and WARNING.

template<int branch>
double utl::InverseMoyalApproximation ( const double  y)
inline

Validity limits for the branch point expansion

Definition at line 31 of file Moyal.cc.

template<int branch>
double utl::InverseMoyalBranchPointExpansion ( const double  y)
inline

Branch point expansion for inverse of the Moyal function

Definition at line 17 of file Moyal.cc.

References G4StationSimulatorOG::p, utl::Sqr(), and sqrt().

double utl::InverseNormalCDF ( const double  p)

Inverse of the comulative normal distribution. Taken from http://home.online.no/~pjacklam/notes/invnorm/ The algorithm has never been published in a journal. The accuracy is more than 15 decimal places.

Inverse normal cumulative distribution function

Definition at line 19 of file NormalDistribution.cc.

References RdGeoCeLDFFitter::a, RdGeoCeLDFFitter::b, RdGeoCeLDFFitter::c, ERROR, utl::kPi, utl::NormalCDF(), utl::Sqr(), and sqrt().

Referenced by utl::InverseNormalCDF(), LDFFinderOG::LDFFinder::Run(), LDFFinderKG::LDFFinder::Run(), and MathTest::TestInverseNormalCDF().

double utl::KolmogorovProbability ( const int  n,
const double  kolmogorovDistance 
)

Kolmogorov-Smirnov probability function

Kolmogorov-Smirnov function returns the significance of Kolmogorov distance between two distributions, i.e. probability that the two distributions are the same (null hypothesis). Kolmogorov distance is obtained as an absolute value of the maximal difference of the two corresponding cumulative distributions (point-wise maximum).

In case of comparing binned probability data to continuous probability call the function with N set to number of data.

In case of comparing two binned distributions use the function that takes the two numbers of data N1 and N2.

Author
Darko Veberic

Definition at line 34 of file Kolmogorov.cc.

References utl::KolmogorovProbability().

template<int branch>
double utl::LambertW ( const double  x)

Lambert W function

utl_LambertW.png

Lambert function $y={\rm W}(x)$ is defined as a solution to the $x=ye^y$ expression and is also known as "product logarithm". Since the inverse of $ye^y$ is not single-valued, the Lambert function has two real branches ${\rm W}_0$ and ${\rm W}_{-1}$.

${\rm W}_0(x)$ has real values in the interval $[-1/e,\infty]$ and ${\rm W}_{-1}(x)$ has real values in the interval $[-1/e,0]$. Accuracy is the nominal double type resolution (16 decimal places).

Template Parameters
branch,:valid values are 0 and -1
Parameters
x,:real-valued argument $\geq-1/e$ (range depends on branch)

Referenced by utl::GaisserHillasInverse(), evt::GaisserHillas4Parameter::Inverse(), and MathTest::TestLambertW().

template<int branch>
double utl::LambertWApproximation ( const double  x)

Approximate Lambert W function Accuracy at least 5 decimal places in all definition range. See LambertW() for details.

Template Parameters
branch,:valid values are 0 and -1
Parameters
x,:real-valued argument $\geq-1/e$

Definition at line 544 of file LambertW.cc.

Referenced by utl::LambertW<-1 >().

double utl::LogGamma ( const double  x)
inline
double utl::Moyal ( const double  x)
inline

Moyal function.

utl_Moyal.png

Moyal function is defined as

\[ {\rm M}(x) = \exp(-{\textstyle\frac12}(x+{\rm e}^{-x})) \]

Definition at line 20 of file Moyal.h.

Referenced by SdSignalRecoveryKLT::SignalRecovery::RecoverSignal(), and SdSignalRecoveryKLT::SignalRecovery::SaturationFitFnc().

double utl::PolynomialInterpolation ( const unsigned int  n,
const double  px[],
const double  py[],
const double  x,
double &  dy 
)
inline

Perform polynomial interpolation or extrapolation.

Neville's algorithm.

With x = { -1, 0, 1, 2, 3 } and y = { 0, 1, 0, 2, -1 } the following results are obtained for interpolation and extrapolation with different n (see image):

utl_PolynomialInterpolation.png
Author
Darko Veberic
Date
28 Apr 2007
Parameters
n,:number of points to take from the x and y array
px,:array of x coordinates of the interpolating points
py,:array of y coordinates of the interpolating points
x,:polynomial evaluation point
dy,:returns the accuracy of the approximation (used in utl::Integrator)
Returns
interpolated value for y in point x

Definition at line 33 of file PolynomialInterpolation.h.

References RdGeoCeLDFFitter::c, ERROR, and utl::m.

Referenced by utl::VectorIntegrator< utl::MuonArrivalTime::SuperArg, 4 >::GetIntegral(), utl::Integrator< utl::MuonArrivalTime::TimePDFArg >::GetRombergIntegral(), utl::PolynomialInterpolation(), and PolynomialInterpolationTest::testSimple().

double utl::PolynomialInterpolation ( const unsigned int  n,
const double  px[],
const double  py[],
const double  x 
)
inline

Perform polynomial interpolation or extrapolation with approximation control.

Author
Darko Veberic
Date
28 Apr 2007
Parameters
n,:number of points to take from the px and py array
px,:array of x coordinates of the interpolating points
py,:array of y coordinates of the interpolating points
x,:polynomial evaluation point

Definition at line 95 of file PolynomialInterpolation.h.

References utl::PolynomialInterpolation().


, generated on Tue Sep 26 2023.