NcmDataGaussCov

NcmDataGaussCov — Gaussian data -- covariance provided.

Functions

Properties

NcmMatrix * cov Read / Write
NcmVector * mean Read / Write
guint n-points Read / Write / Construct
gboolean use-norma Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── NcmData
        ╰── NcmDataGaussCov
            ├── NcDataBaoDHrDAr
            ├── NcDataBaoDMrHr
            ├── NcDataBaoDtrDHr
            ├── NcDataClusterNCountsGauss
            ├── NcDataSNIACov
            ├── NcDataXcor
            ╰── NcmDataGaussCovMVND

Description

Generic gaussian distribution which uses the covariance matrix as input.

Functions

ncm_data_gauss_cov_set_size ()

void
ncm_data_gauss_cov_set_size (NcmDataGaussCov *gauss,
                             guint np);

Sets the data size to np .

[virtual set_size]

Parameters

gauss

a NcmDataGaussCov

 

np

data size.

 

ncm_data_gauss_cov_get_size ()

guint
ncm_data_gauss_cov_get_size (NcmDataGaussCov *gauss);

Gets the data size.

[virtual get_size]

Parameters

gauss

a NcmDataGaussCov

 

Returns

Data size.


ncm_data_gauss_cov_use_norma ()

void
ncm_data_gauss_cov_use_norma (NcmDataGaussCov *gauss,
                              gboolean use_norma);

Sets whether the value of $-2\ln(L)$ will be properly normalized.

Parameters

gauss

a NcmDataGaussCov

 

use_norma

a boolean

 

ncm_data_gauss_cov_replace_mean ()

void
ncm_data_gauss_cov_replace_mean (NcmDataGaussCov *gauss,
                                 NcmVector *mean);

Replaces the current mean vector for mean .

Parameters

gauss

a NcmDataGaussCov

 

mean

new mean NcmVector

 

ncm_data_gauss_cov_set_cov ()

void
ncm_data_gauss_cov_set_cov (NcmDataGaussCov *gauss,
                            NcmMatrix *cov);

Sets a NcmMatrix representing the covariance matrix in each bin.

Parameters

gauss

a NcmDataGaussCov

 

cov

a NcmMatrix

 

ncm_data_gauss_cov_peek_mean ()

NcmVector *
ncm_data_gauss_cov_peek_mean (NcmDataGaussCov *gauss);

Parameters

gauss

a NcmDataGaussCov

 

Returns

the current data mean NcmVector.

[transfer none]


ncm_data_gauss_cov_peek_cov ()

NcmMatrix *
ncm_data_gauss_cov_peek_cov (NcmDataGaussCov *gauss);

Parameters

gauss

a NcmDataGaussCov

 

Returns

the current data covariance NcmMatrix.

[transfer none]


ncm_data_gauss_cov_compute_cov ()

NcmMatrix *
ncm_data_gauss_cov_compute_cov (NcmDataGaussCov *gauss,
                                NcmMSet *mset,
                                gboolean *updated);

Computes the covariance matrix based on the models in mset . If the “cov_func” is not set, returns NULL.

Parameters

gauss

a NcmDataGaussCov

 

mset

a NcmMSet

 

updated

a gboolean.

[out][allow-none]

Returns

the current data covariance NcmMatrix.

[transfer full]


ncm_data_gauss_cov_compute_mean ()

NcmVector *
ncm_data_gauss_cov_compute_mean (NcmDataGaussCov *gauss,
                                 NcmMSet *mset);

Computes the mean vector based on the models in mset . If the “mean_func” is not set, returns NULL.

Parameters

gauss

a NcmDataGaussCov

 

mset

a NcmMSet

 

Returns

the current data mean NcmVector.

[transfer full]


ncm_data_gauss_cov_get_log_norma ()

gdouble
ncm_data_gauss_cov_get_log_norma (NcmDataGaussCov *gauss,
                                  NcmMSet *mset);

Parameters

gauss

a NcmDataGaussCov

 

mset

a NcmMSet

 

Returns

the log-normalization factor for $-2\ln(L)$.


ncm_data_gauss_cov_bulk_resample ()

void
ncm_data_gauss_cov_bulk_resample (NcmDataGaussCov *gauss,
                                  NcmMSet *mset,
                                  NcmMatrix *resample,
                                  NcmRNG *rng);

Resamples the data based on the models in mset according to the current data distribution. The resampled data is stored in resample . The resampling is done in bulk, i.e., all the data is resampled at once.

Parameters

gauss

a NcmDataGaussCov

 

mset

a NcmMSet

 

resample

a NcmMatrix

 

rng

a NcmRNG

 

Types and Values

NCM_TYPE_DATA_GAUSS_COV

#define NCM_TYPE_DATA_GAUSS_COV (ncm_data_gauss_cov_get_type ())

struct NcmDataGaussCovClass

struct NcmDataGaussCovClass {
};

NcmDataGaussCov

typedef struct _NcmDataGaussCov NcmDataGaussCov;

Property Details

The “cov” property

  “cov”                      NcmMatrix *

Data covariance.

Owner: NcmDataGaussCov

Flags: Read / Write


The “mean” property

  “mean”                     NcmVector *

Data mean.

Owner: NcmDataGaussCov

Flags: Read / Write


The “n-points” property

  “n-points”                 guint

Data sample size.

Owner: NcmDataGaussCov

Flags: Read / Write / Construct

Default value: 0


The “use-norma” property

  “use-norma”                gboolean

Use the likelihood normalization to calculate -2lnL.

Owner: NcmDataGaussCov

Flags: Read / Write

Default value: FALSE