cta_util_statistics.h File Reference

Utility for calculating a realization of a standard normal distribution. More...

#include "cta_system.h"

Go to the source code of this file.

Functions

CTAEXPORT void CTA_rand_seed (int seed)
 Initialize the random generator.
CTAEXPORT int CTA_rand_u (double *x)
 Get an uniform random number from the interval [0 1].
CTAEXPORT int CTA_rand_n (double *x)
 Get a random number from a normal distribution whit mean 0 and standard deviation 1.

Detailed Description

Utility for calculating a realization of a standard normal distribution.

Note:
This is just a set of utility routines it does not define any COSTA component

Definition in file cta_util_statistics.h.


Function Documentation

CTAEXPORT int CTA_rand_n ( double *  x  ) 

Get a random number from a normal distribution whit mean 0 and standard deviation 1.

Parameters:
x O receives the random number
Returns:
error status: CTA_OK if successful
CTAEXPORT void CTA_rand_seed ( int  seed  ) 

Initialize the random generator.

Note:
only initialize the random generator once.
Parameters:
seed I some positive initial seed
CTAEXPORT int CTA_rand_u ( double *  x  ) 

Get an uniform random number from the interval [0 1].

Parameters:
x O receives the random number
Returns:
error status: CTA_OK if successful

Generated on 4 Mar 2014 for OpenDA by  doxygen 1.6.1