Method
NumCosmoMathMSetCatalogcalc_ci_direct
Declaration [src]
NcmMatrix*
ncm_mset_catalog_calc_ci_direct (
NcmMSetCatalog* mcat,
NcmMSetFunc* func,
NcmVector* x_v,
GArray* p_val
)
Description [src]
Calculates the mean and the confidence interval (CI) for the value of func for each
p-value in p_val. It stores the results in a NcmVector, where the first element
contains the mean and the following contain the lower and upper bounds for each
p-value in p_val.
This function calculates the quantile directly using:
gsl_stats_quantile_from_sorted_data for this reason it must allocates the catalog
size times the number of elements in x, for a less memory intensive version use ncm_mset_catalog_calc_ci_interp().
The NcmMSetFunc func must be of dimension one.
Example:
If p_val contains two values ($1\sigma$) 0.6827 and ($\sigma$) 0.9545, the first
element will contain the mean, the second and third, the lower and upper bounds,
respectively. Then, the fourth and fifth elements the lower and upper bounds of
$2\sigma$ CI.
Parameters
func-
Type:
NcmMSetFuncA
NcmMSetFuncof type n-n.The data is owned by the caller of the method. x_v-
Type:
NcmVectorNcmVectorof arguments offunc.The data is owned by the caller of the method. p_val-
Type: An array of
doubleP-values for the confidence intervals.
The data is owned by the caller of the method.
Return value
Type: NcmMatrix
A NcmVector containing the mean and lower/upper bound of the confidence interval for func.
| The caller of the method takes ownership of the returned data, and is responsible for freeing it. |