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: NcmFunctionSampleSetFunc

Function used to evaluate new midpoints.

reltol

Type: const gdouble

Relative tolerance for refinement test.

abstol

Type: const gdouble

Absolute tolerance for refinement test.

max_iter

Type: const guint

Maximum number of refinement iterations.

min_pass_threshold

Type: const gint

Minimum interval_ok threshold to consider interval passed.

base_spline

Type: NcmSpline

Base spline used for refinement tests.

The data is owned by the caller of the method.
user_data

Type: gpointer

User data passed to f.

The argument can be NULL.
The data is owned by the caller of the method.