Top |
Multivariate Normal distribution which uses the covariance matrix as input. It should be used with its companion object NcmModelMVND.
NcmDataGaussCovMVND *
ncm_data_gauss_cov_mvnd_new (const guint dim
);
Creates a new dim
-dimensional MVND.
NcmDataGaussCovMVND * ncm_data_gauss_cov_mvnd_new_full (const guint dim
,const gdouble sigma_min
,const gdouble sigma_max
,const gdouble cor_level
,const gdouble mean_min
,const gdouble mean_max
,NcmRNG *rng
);
Creates a new dim
-dimensional MVND and generate using rng
a mean
and correlation matrix using the parameters above.
dim |
dimension of the MVND |
|
sigma_min |
minimum value of $\sigma_i$ |
|
sigma_max |
maximum value of $\sigma_i$ |
|
cor_level |
correlation level |
|
mean_min |
minimum mean $\mu_i$ |
|
mean_max |
maximum mean $\mu_i$ |
|
rng |
a NcmRNG |
NcmDataGaussCovMVND *
ncm_data_gauss_cov_mvnd_ref (NcmDataGaussCovMVND *data_mvnd
);
Increases the reference count of data_mvnd
by one.
void
ncm_data_gauss_cov_mvnd_free (NcmDataGaussCovMVND *data_mvnd
);
Decreases the reference count of data_mvnd
by one.
void
ncm_data_gauss_cov_mvnd_clear (NcmDataGaussCovMVND **data_mvnd
);
If data_mvnd
is different from NULL, decreases the reference count of
data_mvnd
by one and sets data_mvnd
to NULL.
void ncm_data_gauss_cov_mvnd_gen_cov_mean (NcmDataGaussCovMVND *data_mvnd
,const gdouble sigma_min
,const gdouble sigma_max
,const gdouble cor_level
,const gdouble mean_min
,const gdouble mean_max
,NcmRNG *rng
);
Generates using rng
the mean and correlation matrix using
the parameters above.
data_mvnd |
||
sigma_min |
minimum value of $\sigma_i$ |
|
sigma_max |
maximum value of $\sigma_i$ |
|
cor_level |
correlation level |
|
mean_min |
minimum mean $\mu_i$ |
|
mean_max |
maximum mean $\mu_i$ |
|
rng |
a NcmRNG |
void ncm_data_gauss_cov_mvnd_set_cov_mean (NcmDataGaussCovMVND *data_mvnd
,NcmVector *mean
,NcmMatrix *cov
);
Sets the mean and covariance of data_mvnd
.
NcmVector *
ncm_data_gauss_cov_mvnd_peek_mean (NcmDataGaussCovMVND *data_mvnd
);
Peeks current mean vector.
NcmVector * ncm_data_gauss_cov_mvnd_gen (NcmDataGaussCovMVND *data_mvnd
,NcmMSet *mset
,gpointer obj
,NcmDataGaussCovMVNDBound bound
,NcmRNG *rng
,gulong *N
);
Generates one realization of the MVND. If bound
is not NULL,
generates realizations untill bound
returns TRUE.
gdouble ncm_data_gauss_cov_mvnd_est_ratio (NcmDataGaussCovMVND *data_mvnd
,NcmMSet *mset
,gpointer obj
,NcmDataGaussCovMVNDBound bound
,gulong *N
,gulong *Nin
,const gdouble reltol
,NcmRNG *rng
);
Estimate the ratio between accepted realizations and total number
of realizations. The variable reltol
controls the relative tolerance
on the ratio estimate. The variables N
and Nin
can be used to inform
previous number of realizations.
void
ncm_data_gauss_cov_mvnd_log_info (NcmDataGaussCovMVND *data_mvnd
);
Logs mean and covariance matrix.
NcmStatsVec * ncm_data_gauss_cov_mvnd_stats_vec (NcmDataGaussCovMVND *data_mvnd
,NcmMSet *mset
,const guint n
,const glong maxiter
,NcmVector *lower
,NcmVector *upper
,gboolean save_realizations
,NcmRNG *rng
);
Generates a NcmStatsVec with the statistics of the MVND. If
save_realizations
is TRUE, the realizations are saved in the
NcmStatsVec.