NcmPriorGauss

NcmPriorGauss — A gaussian prior for NcmLikelihood

Functions

Properties

double mu Read / Write / Construct
double sigma Read / Write / Construct
double variable Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── NcmMSetFunc
        ╰── NcmPrior
            ╰── NcmPriorGauss
                ├── NcmPriorGaussFunc
                ╰── NcmPriorGaussParam

Description

This object is a subclass of NcmPrior, serving as a base class for Gaussian priors used by NcmLikelihood. These objects describe Gaussian prior distributions applicable to parameters or any derived quantity.

The Gaussian prior is defined as: $$ -2\ln P(x) = \frac{\left(x - \mu\right)^2}{\sigma}, $$ where $\mu$ is the mean and $\sigma$ is the standard deviation. This Gaussian prior places higher probability density around the mean and decreases exponentially as the parameter deviates from the mean.

The prior is not normalized. It is particularly useful for defining a Gaussian prior when the analysis benefits from a smooth and symmetric distribution around the mean. Additionally, it is compatible with least-squares based analysis.

Functions

NcmPriorGaussMean ()

gdouble
(*NcmPriorGaussMean) (NcmPriorGauss *pg,
                      NcmMSet *mset);

ncm_prior_gauss_ref ()

NcmPriorGauss *
ncm_prior_gauss_ref (NcmPriorGauss *pg);

Increases the reference count of pg atomically.

Parameters

pg

a NcmPriorGauss

 

Returns

pg .

[transfer full]


ncm_prior_gauss_free ()

void
ncm_prior_gauss_free (NcmPriorGauss *pg);

Decreases the reference count of pg atomically.

Parameters

pg

a NcmPriorGauss

 

ncm_prior_gauss_clear ()

void
ncm_prior_gauss_clear (NcmPriorGauss **pg);

Decreases the reference count of *pg and sets *pg to NULL.

Parameters

pg

a NcmPriorGauss

 

ncm_prior_gauss_set_mean ()

void
ncm_prior_gauss_set_mean (NcmPriorGauss *pg,
                          const gdouble mean);

Sets the mean of pg .

Parameters

pg

a NcmPriorGauss

 

mean

mean

 

ncm_prior_gauss_set_sigma ()

void
ncm_prior_gauss_set_sigma (NcmPriorGauss *pg,
                           const gdouble sigma);

Sets the standard deviation of pg .

Parameters

pg

a NcmPriorGauss

 

sigma

standard deviation

 

ncm_prior_gauss_set_var ()

void
ncm_prior_gauss_set_var (NcmPriorGauss *pg,
                         const gdouble var);

Sets the variable of pg .

Parameters

pg

a NcmPriorGauss

 

var

variable

 

ncm_prior_gauss_get_mean ()

gdouble
ncm_prior_gauss_get_mean (NcmPriorGauss *pg);

Parameters

pg

a NcmPriorGauss

 

Returns

the mean of pg .


ncm_prior_gauss_get_sigma ()

gdouble
ncm_prior_gauss_get_sigma (NcmPriorGauss *pg);

Parameters

pg

a NcmPriorGauss

 

Returns

the standard deviation of pg .


ncm_prior_gauss_get_var ()

gdouble
ncm_prior_gauss_get_var (NcmPriorGauss *pg);

Parameters

pg

a NcmPriorGauss

 

Returns

the variable of pg .

Types and Values

NCM_TYPE_PRIOR_GAUSS

#define NCM_TYPE_PRIOR_GAUSS (ncm_prior_gauss_get_type ())

struct NcmPriorGaussClass

struct NcmPriorGaussClass {
};

NcmPriorGauss

typedef struct _NcmPriorGauss NcmPriorGauss;

Property Details

The “mu” property

  “mu”                       double

mean.

Owner: NcmPriorGauss

Flags: Read / Write / Construct

Default value: 0


The “sigma” property

  “sigma”                    double

standard deviation.

Owner: NcmPriorGauss

Flags: Read / Write / Construct

Default value: 1


The “variable” property

  “variable”                 double

variable.

Owner: NcmPriorGauss

Flags: Read / Write / Construct

Default value: 0