NAME
mv_gaussian_rand - Samples a gaussian random vector
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
int mv_gaussian_rand
(
Vector **sample,
const Vector *mean,
const Matrix *covar_mat
);
DESCRIPTION
This routine generates a normally-distributed vector of with mean
'mean' and covariance matrix 'covar_mat', where 'covar_mat' is positive-definite.
For the special case where the covariance is diagonal, use the much faster
routine mv_ind_gaussian_rand(). This routine uses kjb_rand().
RETURNS
Returns ERROR on failure, setting the the errors string accordingly, and
NO_ERROR otherwise.
NOTE
It obtains a standard gaussian vector using mv_std_gaussian_rand and uses
the Cholesky decomposition method to convert it into one with the specified
mean and covariance matrix.
The first argument is the adress of the target vector. If the target vector
itself is NULL, then a vector of the appropriate size is created. If the
target vector is the wrong size, it is resized. Finally, if it is the right
size, then the storage is recycled, as is.
RELATED
gauss_rand
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Ernesto Brau
DOCUMENTER
Ernesto Brau
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
,
gauss_rand_2
,
lookup_gauss_rand
,
gaussian_rand
,
mv_std_gaussian_rand
,
mv_ind_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