sample_from_gaussian_process_prior - Samples from the prior of a Gaussian process
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
const Vector_vector *indices,
int (*mean_func)(Vector **,const Vector *,int),
int (*cov_func)(Matrix **,const Vector *,const Vector *,const void *,int),
const void *hyper_params,
This routine samples from the prior distribution of a Gaussian process, whose
mean function and covariance function are given by mean_func and cov_func,
respectively. The sample will be in the indices given by the vectors of indices,
and will each be of dimension d.
Naturally, the vectors of indices must all be of equal length, and mean_func and
cov_func must return a d-vector and a square matrix of dimension d, respectively.
The library provides a few widely-used mean and covariance functions. Also, sample
will have indices->length vectors, each of length d.
If the vector pointed to by sample is NULL, then a vector of the appropriate size
is created. If it exists, but is the wrong size, then it is recreated. Otherwise,
the storage is recycled.
If the routine fails (due to storage allocation, an error in the mean or
covariance functions, or a mismatch in the sizes of the indices), then ERROR
is returned with and error message being set. Otherwise NO_ERROR is returned.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.