Top | ![]() |
![]() |
![]() |
![]() |
NcmStatsDistNdNcmStatsDistNd — Abstract class for implementing N dimensional probability distributions |
Functions
NcmStatsDistNd * | ncm_stats_dist_nd_ref () |
void | ncm_stats_dist_nd_free () |
void | ncm_stats_dist_nd_clear () |
guint | ncm_stats_dist_nd_get_dim () |
void | ncm_stats_dist_nd_prepare () |
void | ncm_stats_dist_nd_prepare_interp () |
gdouble | ncm_stats_dist_nd_eval () |
gdouble | ncm_stats_dist_nd_eval_m2lnp () |
void | ncm_stats_dist_nd_sample () |
void | ncm_stats_dist_nd_kernel_sample () |
gdouble | ncm_stats_dist_nd_kernel_eval_m2lnp () |
void | ncm_stats_dist_nd_reset () |
Functions
ncm_stats_dist_nd_ref ()
NcmStatsDistNd *
ncm_stats_dist_nd_ref (NcmStatsDistNd *dnd
);
Increases the reference count of dnd
.
ncm_stats_dist_nd_free ()
void
ncm_stats_dist_nd_free (NcmStatsDistNd *dnd
);
Decreases the reference count of dnd
.
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.
ncm_stats_dist_nd_prepare ()
void
ncm_stats_dist_nd_prepare (NcmStatsDistNd *dnd
);
Prepares the object for calculations.
[virtual prepare]
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]
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]
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]
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]
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]
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]
ncm_stats_dist_nd_reset ()
void
ncm_stats_dist_nd_reset (NcmStatsDistNd *dnd
);
Reset the object discarding all added points.
[virtual reset]
Property Details
The “dimension”
property
“dimension” guint
PDF dimension.
Flags: Read / Write / Construct Only
Allowed values: >= 2
Default value: 2