Top | ![]() |
![]() |
![]() |
![]() |
NcmStatsDist1dNcmStatsDist1d — Abstract class for implementing one dimensional probability distributions |
Functions
Functions
ncm_stats_dist1d_ref ()
NcmStatsDist1d *
ncm_stats_dist1d_ref (NcmStatsDist1d *sd1
);
Increases the reference count of sd1
.
ncm_stats_dist1d_free ()
void
ncm_stats_dist1d_free (NcmStatsDist1d *sd1
);
Decreases the reference count of sd1
.
ncm_stats_dist1d_clear ()
void
ncm_stats_dist1d_clear (NcmStatsDist1d **sd1
);
Decreases the reference count of *sd1
and sets the pointer *sd1
to NULL.
ncm_stats_dist1d_prepare ()
void
ncm_stats_dist1d_prepare (NcmStatsDist1d *sd1
);
Prepares the object for calculations.
ncm_stats_dist1d_eval_p ()
gdouble ncm_stats_dist1d_eval_p (NcmStatsDist1d *sd1
,gdouble x
);
Calculates the value of the probability density at x
.
ncm_stats_dist1d_eval_m2lnp ()
gdouble ncm_stats_dist1d_eval_m2lnp (NcmStatsDist1d *sd1
,gdouble x
);
Calculates the value of the $-2\ln(p(x))$ for the probability density.
It can be unnormalized, the norma can be retrieved using
ncm_stats_dist1d_eval_norma()
.
ncm_stats_dist1d_eval_pdf ()
gdouble ncm_stats_dist1d_eval_pdf (NcmStatsDist1d *sd1
,gdouble x
);
Calculates the value of the probability of the interval [x_i, x
].
ncm_stats_dist1d_eval_norma ()
gdouble
ncm_stats_dist1d_eval_norma (NcmStatsDist1d *sd1
);
Calculates the norma of the distribution. If the probability density is already normalized it will return 1.0.
ncm_stats_dist1d_eval_inv_pdf ()
gdouble ncm_stats_dist1d_eval_inv_pdf (NcmStatsDist1d *sd1
,gdouble u
);
Calculates the value of the random variable $x$ for which the cumulative distribution satisfy $\int_{x_i}^x\mathrm{d}x^\prime p(x^\prime) = u$.
ncm_stats_dist1d_eval_inv_pdf_tail ()
gdouble ncm_stats_dist1d_eval_inv_pdf_tail (NcmStatsDist1d *sd1
,gdouble v
);
Calculates the value of the random variable $x$ for which the cumulative distribution satisfy $\int_{x}^{x_f}\mathrm{d}x^\prime p(x^\prime) = v$.
ncm_stats_dist1d_gen ()
gdouble ncm_stats_dist1d_gen (NcmStatsDist1d *sd1
,NcmRNG *rng
);
Generates a realization of the probability distribution.
ncm_stats_dist1d_eval_mode ()
gdouble
ncm_stats_dist1d_eval_mode (NcmStatsDist1d *sd1
);
Calculates the mode of the distribution.
Property Details
The “abstol”
property
“abstol” double
Absolute tolerance on the random variables.
Owner: NcmStatsDist1d
Flags: Read / Write / Construct
Allowed values: >= 0
Default value: 0
The “max-prob”
property
“max-prob” double
Maximal probability considered.
Owner: NcmStatsDist1d
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 1
The “norma”
property
“norma” double
Distribution norma.
Owner: NcmStatsDist1d
Flags: Read
Allowed values: >= 0
Default value: 0
The “reltol”
property
“reltol” double
relative tolerance.
Owner: NcmStatsDist1d
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 2.22045e-16