NcmStatsDistNd

NcmStatsDistNd — Abstract class for implementing N dimensional probability distributions

Properties

guint dimension Read / Write / Construct Only

Object Hierarchy

    GObject
    ╰── NcmStatsDistNd
        ╰── NcmStatsDistNdKDEGauss

Description

Abstract class to reconstruct an arbitrary N dimensional probability distribution.

Functions

ncm_stats_dist_nd_ref ()

NcmStatsDistNd *
ncm_stats_dist_nd_ref (NcmStatsDistNd *dnd);

Increases the reference count of dnd .

Parameters

dnd

a NcmStatsDistNd

 

Returns

dnd .

[transfer full]


ncm_stats_dist_nd_free ()

void
ncm_stats_dist_nd_free (NcmStatsDistNd *dnd);

Decreases the reference count of dnd .

Parameters

dnd

a NcmStatsDistNd

 

ncm_stats_dist_nd_clear ()

void
ncm_stats_dist_nd_clear (NcmStatsDistNd **dnd);

Decreases the reference count of *dnd and sets the pointer *dnd to NULL.

Parameters

dnd

a NcmStatsDistNd

 

ncm_stats_dist_nd_get_dim ()

guint
ncm_stats_dist_nd_get_dim (NcmStatsDistNd *dnd);

Parameters

dnd

a NcmStatsDistNd

 

Returns

the dimension of the sample space.


ncm_stats_dist_nd_prepare ()

void
ncm_stats_dist_nd_prepare (NcmStatsDistNd *dnd);

Prepares the object for calculations.

[virtual prepare]

Parameters

dnd

a NcmStatsDistNd

 

ncm_stats_dist_nd_prepare_interp ()

void
ncm_stats_dist_nd_prepare_interp (NcmStatsDistNd *dnd,
                                  NcmVector *m2lnp);

Prepares the object for calculations. Using the distribution values at the sample points.

[virtual prepare_interp]

Parameters

dnd

a NcmStatsDistNd

 

m2lnp

a NcmVector containing the distribution values

 

ncm_stats_dist_nd_eval ()

gdouble
ncm_stats_dist_nd_eval (NcmStatsDistNd *dnd,
                        NcmVector *x);

Evaluate the distribution at $\vec{x}=$x . If the distribution was prepared using ncm_stats_dist_nd_prepare_interp(), the results will follow the interpolation and may not be properly normalized. In this case the method ncm_stats_dist_nd_eval_m2lnp() should be used to avoid underflow.

[virtual eval]

Parameters

dnd

a NcmStatsDistNd

 

x

a NcmVector

 

Returns

$P(\vec{x})$.


ncm_stats_dist_nd_eval_m2lnp ()

gdouble
ncm_stats_dist_nd_eval_m2lnp (NcmStatsDistNd *dnd,
                              NcmVector *x);

Evaluate the distribution at $\vec{x}=$x . If the distribution was prepared using ncm_stats_dist_nd_prepare_interp(), the results will follow the interpolation and may not be properly normalized.

[virtual eval_m2lnp]

Parameters

dnd

a NcmStatsDistNd

 

x

a NcmVector

 

Returns

$P(\vec{x})$.


ncm_stats_dist_nd_sample ()

void
ncm_stats_dist_nd_sample (NcmStatsDistNd *dnd,
                          NcmVector *x,
                          NcmRNG *rng);

Using the pseudo-random number generator rng generates a point from the distribution and copy it to x .

[virtual sample]

Parameters

dnd

a NcmStatsDistNd

 

x

a NcmVector

 

rng

a NcmRNG

 

ncm_stats_dist_nd_kernel_sample ()

void
ncm_stats_dist_nd_kernel_sample (NcmStatsDistNd *dnd,
                                 NcmVector *x,
                                 NcmVector *mu,
                                 const gdouble scale,
                                 NcmRNG *rng);

Using the pseudo-random number generator rng generates a point from the distribution and copy it to x .

[virtual kernel_sample]

Parameters

dnd

a NcmStatsDistNd

 

x

a NcmVector

 

mu

a NcmVector

 

scale

a double

 

rng

a NcmRNG

 

ncm_stats_dist_nd_kernel_eval_m2lnp ()

gdouble
ncm_stats_dist_nd_kernel_eval_m2lnp (NcmStatsDistNd *dnd,
                                     NcmVector *x,
                                     NcmVector *y,
                                     const gdouble scale);

Evaluates a single kernel at x and y and scale s , i.e., $K_s(x,y)$.

[virtual kernel_eval_m2lnp]

Parameters

dnd

a NcmStatsDistNd

 

x

a NcmVector

 

y

a NcmVector

 

scale

covariance scale

 

Returns

$K_s(x,y)$.


ncm_stats_dist_nd_reset ()

void
ncm_stats_dist_nd_reset (NcmStatsDistNd *dnd);

Reset the object discarding all added points.

[virtual reset]

Parameters

dnd

a NcmStatsDistNd

 

Property Details

The “dimension” property

  “dimension”                guint

PDF dimension.

Owner: NcmStatsDistNd

Flags: Read / Write / Construct Only

Allowed values: >= 2

Default value: 2