NAME
gauss_rand - Returns a Gaussian distributed, random number
SYNOPSIS
#include "sample/sample_gauss.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
double gauss_rand(void);
DESCRIPTION
This routine returns an approximately Gaussian distributed, random number,
with mean zero and variance one. The random stream from kjb_rand() is used.
Polar version of the Box-Muller method with sample caching. Every run
of Box-Muller algorithm generates two independent samples. In order to save
computation, the second sample is cached in a static variable. It is returned
on the next call to the routine, thus saving computation. More efficient and
numerically more stable. Details of this method can be found at:
http://en.wikipedia.org/wiki/Box-Muller_transform
http://www.taygeta.com/random/gaussian.html
RELATED
kjb_rand, gauss_rand_2
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Prasad
SEE ALSO
get_general_sv_gauss_random_matrix
,
get_gauss_random_matrix
,
get_gauss_random_matrix_2
,
get_gauss_random_vector
,
get_gauss_random_vector_2
,
get_lookup_gauss_random_vector
,
gauss_rand_2
,
lookup_gauss_rand
,
gaussian_rand
,
mv_std_gaussian_rand
,
mv_ind_gaussian_rand
,
mv_gaussian_rand
,
gaussian_pdf
,
mv_std_gaussian_pdf
,
mv_ind_gaussian_pdf
,
mv_gaussian_pdf
,
gaussian_log_pdf
,
mv_std_gaussian_log_pdf
,
mv_ind_gaussian_log_pdf
,
mv_gaussian_log_pdf
,
get_general_gauss_random_vector
,
get_density_gaussian
,
get_log_density_gaussian
,
log_gaussian_pdf
,
gaussian_rand_with_limits