Method
NumCosmoMathFunctionSampleSetadaptive_midpoint
Declaration [src]
void
ncm_function_sample_set_adaptive_midpoint (
NcmFunctionSampleSet* fss,
NcmFunctionSampleSetFunc f,
const gdouble reltol,
const gdouble abstol,
const guint max_iter,
const gint min_pass_threshold,
NcmSpline* base_spline,
gpointer user_data
)
Description [src]
Performs an iterative midpoint-based adaptive refinement similar to the
Python test harness. On each iteration intervals with interval_ok <
min_pass_threshold receive their midpoint inserted (evaluated via f). After
insertion, a refinement pass is performed via ncm_function_sample_set_refine(). The
process stops when all intervals reach min_pass_threshold or when max_iter is reached.
Parameters
f-
Type:
NcmFunctionSampleSetFuncFunction used to evaluate new midpoints.
reltol-
Type:
const gdoubleRelative tolerance for refinement test.
abstol-
Type:
const gdoubleAbsolute tolerance for refinement test.
max_iter-
Type:
const guintMaximum number of refinement iterations.
min_pass_threshold-
Type:
const gintMinimum interval_ok threshold to consider interval passed.
base_spline-
Type:
NcmSplineBase spline used for refinement tests.
The data is owned by the caller of the method. user_data-
Type:
gpointerUser data passed to
f.The argument can be NULL.The data is owned by the caller of the method.