NcmDataGaussCovMVND

NcmDataGaussCovMVND — Multivariate Normal Distribution -- covariance provided.

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── NcmData
        ╰── NcmDataGaussCov
            ╰── NcmDataGaussCovMVND

Description

Multivariate Normal distribution which uses the covariance matrix as input. It should be used with its companion object NcmModelMVND.

Functions

NcmDataGaussCovMVNDBound ()

gboolean
(*NcmDataGaussCovMVNDBound) (gpointer obj,
                             NcmVector *y);

ncm_data_gauss_cov_mvnd_new ()

NcmDataGaussCovMVND *
ncm_data_gauss_cov_mvnd_new (const guint dim);

Creates a new dim -dimensional MVND.

Parameters

dim

dimension of the MVND

 

Returns

the newly created object.


ncm_data_gauss_cov_mvnd_new_full ()

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.

Parameters

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

 

Returns

the newly created object.


ncm_data_gauss_cov_mvnd_ref ()

NcmDataGaussCovMVND *
ncm_data_gauss_cov_mvnd_ref (NcmDataGaussCovMVND *data_mvnd);

Increases the reference count of data_mvnd by one.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

Returns

data_mvnd .

[transfer full]


ncm_data_gauss_cov_mvnd_free ()

void
ncm_data_gauss_cov_mvnd_free (NcmDataGaussCovMVND *data_mvnd);

Decreases the reference count of data_mvnd by one.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

ncm_data_gauss_cov_mvnd_clear ()

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.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

ncm_data_gauss_cov_mvnd_gen_cov_mean ()

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.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

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

 

ncm_data_gauss_cov_mvnd_set_cov_mean ()

void
ncm_data_gauss_cov_mvnd_set_cov_mean (NcmDataGaussCovMVND *data_mvnd,
                                      NcmVector *mean,
                                      NcmMatrix *cov);

Sets the mean and covariance of data_mvnd .

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

mean

a NcmVector

 

cov

a NcmMatrix

 

ncm_data_gauss_cov_mvnd_peek_mean ()

NcmVector *
ncm_data_gauss_cov_mvnd_peek_mean (NcmDataGaussCovMVND *data_mvnd);

Peeks current mean vector.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

Returns

the current mean vector.

[transfer none]


ncm_data_gauss_cov_mvnd_gen ()

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.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

mset

a NcmMSet

 

obj

a pointer to use in bound .

[allow-none]

bound

a NcmDataGaussCovMVNDBound.

[scope call][allow-none]

rng

a NcmRNG

 

N

number of realizations necessary to generate a valid one.

[out]

Returns

a NcmVector (should not be modified).

[transfer none]


ncm_data_gauss_cov_mvnd_est_ratio ()

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.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

mset

a NcmMSet

 

obj

a pointer to use in bound

 

bound

a NcmDataGaussCovMVNDBound.

[scope call]

N

total number of realizations.

[inout]

Nin

number of realizations accepted.

[inout]

reltol

relative tolerance

 

rng

a NcmRNG

 

Returns

estimated ratio


ncm_data_gauss_cov_mvnd_log_info ()

void
ncm_data_gauss_cov_mvnd_log_info (NcmDataGaussCovMVND *data_mvnd);

Logs mean and covariance matrix.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

ncm_data_gauss_cov_mvnd_stats_vec ()

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.

Parameters

data_mvnd

a NcmDataGaussCovMVND

 

mset

a NcmMSet

 

n

number of realizations

 

maxiter

maximum number of iterations

 

lower

lower bound

 

upper

upper bound

 

save_realizations

whether to save realizations

 

rng

a NcmRNG

 

Returns

a new NcmStatsVec with the statistics of the MVND.

[transfer full]

Types and Values

NCM_TYPE_DATA_GAUSS_COV_MVND

#define NCM_TYPE_DATA_GAUSS_COV_MVND (ncm_data_gauss_cov_mvnd_get_type ())

NcmDataGaussCovMVND

typedef struct _NcmDataGaussCovMVND NcmDataGaussCovMVND;