Method

NumCosmoMathSplinenew_data

Declaration [src]

NcmSpline*
ncm_spline_new_data (
  const NcmSpline* s,
  gdouble* x,
  gdouble* y,
  const gsize len,
  const gboolean init
)

Description [src]

This function returns a new NcmSpline, where the knots of this new spline are given in the array x and the values of the function, at those knots, to be interpolated are given in the array y.

Parameters

x

Type: gdouble*

Array of knots.

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

Type: gdouble*

Array of the values of the function, to be interpolated, computed at x.

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

Type: const gsize

Length of x and y.

init

Type: const gboolean

TRUE to prepare the new NcmSpline or FALSE to not prepare it.

Return value

Type: NcmSpline

A new NcmSpline.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.