Class
NumCosmoMathPriorFlat
Description [src]
class NumCosmoMath.PriorFlat : NumCosmoMath.Prior
{
/* No available fields */
}
Base class for flat prior distributions.
This object subclasses NcmPrior and defines a base class for flat priors used by
NcmLikelihood. These objects describe flat prior distributions applicable to
parameters or any derived quantity.
The prior is defined as: $$ -2\ln P(x) = \exp\left(\frac{2 h_0}{s} \left(\left(x_0 - x\right) + \frac{s}{2.0}\right)\right) + \exp\left(\frac{2 h_0}{s} \left(\left(x - x_1\right) + \frac{s}{2.0}\right)\right), $$ where $x_0$ and $x_1$ are the lower and upper limits, respectively, and $s$ is the scale of the prior. The variable $h_0$ has a default value of $20.0$. Note that for $x = x_0$, the first term is $e^{h_0}$ and grows exponentially with $x$ decreasing. For $x = x_0 + s$, the first term is $e^{-h_0}$ and decreases exponentially with $x$ increasing. The same happens for the second term around $x_1$.
The prior is not normalized. It is useful for defining a flat prior when the analysis is sensitive to discontinuities in the prior.
Instance methods
Methods inherited from NcmPrior (3)
ncm_prior_free
Decreases the reference count of prior atomically.
ncm_prior_is_m2lnL
ncm_prior_ref
Increases the reference count of prior atomically.
Methods inherited from NcmMSetFunc (22)
ncm_mset_func_eval
Evaluate the function func at x and store the result in res.
ncm_mset_func_eval0
Evaluate the function func and return the result. This
function is only valid if func is a scalar function.
The function’s arguments are either none, if the function is constant,
or the arguments passed to ncm_mset_func_set_eval_x().
ncm_mset_func_eval1
Evaluate the function func at x and return the result. This
function is only valid if func is a scalar function.
ncm_mset_func_eval_nvar
Evaluate the function func at x and return the result. This
function is only valid if func is a scalar function.
ncm_mset_func_eval_vector
Compute the function func at x_v and store the result in res_v. This function is
only valid if func is a vectorial function.
ncm_mset_func_free
Decreases the reference count of func by one. If the reference count
reaches zero, func is freed.
ncm_mset_func_get_dim
Gets the dimension of func.
ncm_mset_func_get_nvar
Gets the number of variables of func.
ncm_mset_func_has_nvar
Checks if func expects nvar extra variables.
ncm_mset_func_is_const
Checks if func is a constant function.
ncm_mset_func_is_scalar
Checks if func is a scalar function.
ncm_mset_func_is_vector
Checks if func is a vectorial function with dimension dim.
ncm_mset_func_numdiff_fparams
Computes the gradient of func at x and stores the result in out.
This function is only valid if func is a scalar function.
ncm_mset_func_peek_desc
ncm_mset_func_peek_name
ncm_mset_func_peek_ns
ncm_mset_func_peek_symbol
ncm_mset_func_peek_uname
Peeks unique name.
ncm_mset_func_peek_usymbol
Peeks unique symbol.
ncm_mset_func_ref
Increases the reference count of func by one.
ncm_mset_func_set_eval_x
Sets the function’s arguments to x. Once this function is called, the
function’s arguments are fixed and func becomes a constant function.
ncm_mset_func_set_meta
Sets the function’s metadata. This function is called by subclasses’ to set the function’s metadata. It should not be called by users.
Properties
Properties inherited from NcmMSetFunc (3)
NumCosmoMath.MSetFunc:dimension
NumCosmoMath.MSetFunc:eval-x
NumCosmoMath.MSetFunc:nvariables
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Class structure
struct NumCosmoMathPriorFlatClass {
/* no available fields */
}
No description available.