Scalar functions


Random numbers using GSL

void rng_init ()
 Initializes the random number generator.
double randomFlat ()
 Retruns a random number in the interval ]0;1[.
double randomGaussian (double mu, double sigma)
 Retruns a random number on a Gaussian distribution.
double randomExp (double mu)
 Retruns a random number on a Gaussian distribution.
double randomRayleigh (double sigma)
 Retruns a random number on a Rayleigh distribution.

Mathematical scalar functions using GSL

double bessel (double x, int n)
double airy (double x)
double erf (double x)
double gamma (double x)
double beta (double a, double b)
double factorial (int n)
 Return the factorial of n.
double binomialCoefficient (int n, int k)
 Return the binomial coefficient of n and k, $ C^n_k $.

String tools

*string fileNumber (int number, int ndigits=0)
 Create a string from an integer.
template<class T>
*string formatNumber (T number, const char *format)
 Format a number.
template<class T>
string sconv (T t)
 Convert an object of any type to a string.
template<class T>
conv (string s)
template<class T>
getField (string str, int field)
template<>
string getField< string > (string str, int field)

Standard scalar functions

template<class T>
largest< float, T >::type sinc (T x)
 Return sinc(x) = sin(x)/x.
template<class T>
step (T x)
 Return the value of the step function: 0 if x<0 and 1 otherwise.
template<class T, class T2>
round (T x, T2 s=1)
 Round the number with a precision defined by s.

Detailed Description

Scalar functions available with IDIL: exp, sin, cos, floor, ceil, etc...

Function Documentation

double airy ( double  x  )  [inline]

Return the value of the Airy function: $ Ai(x) = (1/\pi) \int_0^\infty \cos((1/3) t^3 + xt) dt $

double bessel ( double  x,
int  n 
) [inline]

Return the value of the cylindrical Bessel function $ J_n(x) $

double beta ( double  a,
double  b 
) [inline]

Return the value of the Beta function of a and b.

template<class T>
T conv ( string  s  )  [inline]

Convert a int to a string into any type T. Use conv<T>(str)

double erf ( double  x  )  [inline]

Return the value of the error function: $ erf(x) = (2/\sqrt(\pi)) \int_0^x dt \exp(-t^2) $

* string fileNumber ( int  number,
int  ndigits = 0 
) [inline]

Create a string from an integer.

Parameters:
number : number to be converted
ndigits : number of digits; complete at the beginning with "0"s.

template<class T>
* string formatNumber ( number,
const char *  format 
) [inline]

Format a number.

Parameters:
number : number to be converted
format : string containing the c-style printf format.
The user has to check the consistancy of the format and file type sent to the function. No type safety !!!

double gamma ( double  x  )  [inline]

Return the value of the gamma function: $ \Gamma(x) = \int_0^\infty dt t^{x-1} \exp(-t) $

template<class T>
T getField ( string  str,
int  field 
) [inline]

Extract a given field in a string. Default separator is a space. Later versions will improve this.


Generated on Fri Oct 24 18:41:59 2008 for IDIL by  doxygen 1.5.5