NcmMSetTransKern

NcmMSetTransKern — Abstract Class for a transition kernel and prior.

Functions

Properties

NcmMSet * mset Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── NcmMSetTransKern
        ├── NcmMSetTransKernCat
        ├── NcmMSetTransKernFlat
        ╰── NcmMSetTransKernGauss

Description

This object defines the abstract class for a transition kernel and prior. It serves as the base class for all transition kernels and priors, with two main purposes:

  • To define the interface for all transition kernels for use in the NcmFitMCMC object.

  • To define the interface for all priors, generating random parameter vectors with multivariate parameters.

Notably, it acts as a prior sampler for NcmFitESMCMC, generating the initial population's first set of random parameter vectors.

Functions

ncm_mset_trans_kern_ref ()

NcmMSetTransKern *
ncm_mset_trans_kern_ref (NcmMSetTransKern *tkern);

Increases the reference count of tkern .

Parameters

tkern

a NcmMSetTransKern.

 

Returns

tkern .

[transfer full]


ncm_mset_trans_kern_free ()

void
ncm_mset_trans_kern_free (NcmMSetTransKern *tkern);

Increases the reference count of tkern .

Parameters

tkern

a NcmMSetTransKern.

 

ncm_mset_trans_kern_clear ()

void
ncm_mset_trans_kern_clear (NcmMSetTransKern **tkern);

If *tkern is not NULL, unrefs it and sets *tkern to NULL.

Parameters

tkern

a NcmMSetTransKern.

 

ncm_mset_trans_kern_set_mset ()

void
ncm_mset_trans_kern_set_mset (NcmMSetTransKern *tkern,
                              NcmMSet *mset);

Sets the mset as the internal set NcmMSet to be used by the transition kernel.

[virtual set_mset]

Parameters

tkern

a NcmMSetTransKern.

 

mset

a NcmMSet.

 

ncm_mset_trans_kern_peek_mset ()

NcmMSet *
ncm_mset_trans_kern_peek_mset (NcmMSetTransKern *tkern);

Parameters

tkern

a NcmMSetTransKern.

 

Returns

the internal set NcmMSet.

[transfer none]


ncm_mset_trans_kern_set_prior ()

void
ncm_mset_trans_kern_set_prior (NcmMSetTransKern *tkern,
                               NcmVector *theta);

Sets the theta as the prior mean. This allows the transition kernel to be used as a prior sampler.

Parameters

tkern

a NcmMSetTransKern.

 

theta

a NcmMSet.

 

ncm_mset_trans_kern_set_prior_from_mset ()

void
ncm_mset_trans_kern_set_prior_from_mset
                               (NcmMSetTransKern *tkern);

As ncm_mset_trans_kern_set_prior() but uses the values present in the internal set NcmMSet.

Parameters

tkern

a NcmMSetTransKern.

 

ncm_mset_trans_kern_generate ()

void
ncm_mset_trans_kern_generate (NcmMSetTransKern *tkern,
                              NcmVector *theta,
                              NcmVector *thetastar,
                              NcmRNG *rng);

Generates a new point thetastar from theta using the transition kernel.

[virtual generate]

Parameters

tkern

a NcmMSetTransKern.

 

theta

current point.

 

thetastar

try point.

 

rng

a NcmRNG.

 

ncm_mset_trans_kern_pdf ()

gdouble
ncm_mset_trans_kern_pdf (NcmMSetTransKern *tkern,
                         NcmVector *theta,
                         NcmVector *thetastar);

Computes the value of the kernel at (theta , thetastar ).

[virtual pdf]

Parameters

tkern

a NcmMSetTransKern.

 

theta

current point.

 

thetastar

try point.

 

Returns

the value of the kernel at (theta , thetastar ).


ncm_mset_trans_kern_prior_sample ()

void
ncm_mset_trans_kern_prior_sample (NcmMSetTransKern *tkern,
                                  NcmVector *thetastar,
                                  NcmRNG *rng);

Sample from the transition kernel using it as a prior. To use as a prior one must call one of the functions ncm_mset_trans_kern_set_prior_* first.

Parameters

tkern

a NcmMSetTransKern.

 

thetastar

try point.

 

rng

a NcmRNG.

 

ncm_mset_trans_kern_prior_pdf ()

gdouble
ncm_mset_trans_kern_prior_pdf (NcmMSetTransKern *tkern,
                               NcmVector *thetastar);

Computes the value of the kernel at (ktern->theta , thetastar ). To use as a prior one must call the ncm_mset_trans_kern_set_prior() or ncm_mset_trans_kern_set_prior_from_mset() first.

Parameters

tkern

a NcmMSetTransKern.

 

thetastar

try point.

 

Returns

the value of the kernel at (ktern->theta , thetastar ).


ncm_mset_trans_kern_reset ()

void
ncm_mset_trans_kern_reset (NcmMSetTransKern *tkern);

Resets the transition kernel.

[virtual reset]

Parameters

tkern

a NcmMSetTransKern.

 

ncm_mset_trans_kern_get_name ()

const gchar *
ncm_mset_trans_kern_get_name (NcmMSetTransKern *tkern);

[virtual get_name]

Parameters

tkern

a NcmMSetTransKern.

 

Returns

the name of the sampler.

Types and Values

NCM_TYPE_MSET_TRANS_KERN

#define NCM_TYPE_MSET_TRANS_KERN (ncm_mset_trans_kern_get_type ())

struct NcmMSetTransKernClass

struct NcmMSetTransKernClass {
};

NcmMSetTransKern

typedef struct _NcmMSetTransKern NcmMSetTransKern;

Property Details

The “mset” property

  “mset”                     NcmMSet *

NcmMSet.

Owner: NcmMSetTransKern

Flags: Read / Write / Construct Only