Method

NumCosmoMathFunctionSampleSetrefine

Declaration [src]

void
ncm_function_sample_set_refine (
  NcmFunctionSampleSet* fss,
  const gdouble reltol,
  const gdouble abstol,
  NcmSpline* base_spline
)

Description [src]

Performs a refinement pass on all NEW points. For each NEW point, this function: 1. Creates a spline using OLD points only 2. Evaluates the spline at the NEW point position 3. Computes the error: ||f(x) - spline_f(x)||_2 < reltol * ||f(x)||_2 + abstol 4. If the test passes, increments interval_ok for both the NEW point and its left neighbor 5. Marks all NEW points as OLD

The interval_ok counter at node i indicates how many times the interval [i, i+1] has passed the refinement test. After refinement, all points are marked as OLD for the next iteration.

Parameters

reltol

Type: const gdouble

Relative tolerance for refinement test.

abstol

Type: const gdouble

Absolute tolerance for refinement test.

base_spline

Type: NcmSpline

A NcmSpline to use as the base spline type.

The data is owned by the caller of the method.