Skip to content

Provide replacement for gsl_bspline_eval_nonzero

Leo P. Singer requested to merge leo-singer/lalsuite:gsl_bspline_basis into master

Description

This function was replaced with gsl_bspline_basis in GSL 2.8.

Compare the documentation from GSL 2.8:

int gsl_bspline_basis(const double x, gsl_vector *B, size_t *istart, gsl_bspline_workspace *w)

This function evaluates all potentially nonzero B-spline basis functions at the position x and stores them in the vector B of length k, so that the i-th element is B_{(istart+i)}(x) for i=0,1,\dots,k-1. The output istart is guaranteed to be in [0, n - k]. By returning only the nonzero basis functions, this function allows quantities involving linear combinations of the B_i(x) to be computed without unnecessary terms (such linear combinations occur, for example, when evaluating an interpolated function).

versus the documentation from GSL 2.7:

int gsl_bspline_eval_nonzero(const double x, gsl_vector *Bk, size_t *istart, size_t *iend, gsl_bspline_workspace *w)

This function evaluates all potentially nonzero B-spline basis functions at the position x and stores them in the vector Bk, so that the i-th element is B_{(istart+i)}(x). The last element of Bk is B_{iend}(x). The vector Bk must be of length k. By returning only the nonzero basis functions, this function allows quantities involving linear combinations of the B_i(x) to be computed without unnecessary terms (such linear combinations occur, for example, when evaluating an interpolated function).

The only difference is the removal of the iend argument.

Fixes #742 (closed). Fixes !2294 (closed).

API Changes and Justification

Backwards Compatible Changes

  • This change does not modify any class/function/struct/type definitions in a public C header file or any Python class/function definitions
  • This change adds new classes/functions/structs/types to a public C header file or Python module

Backwards Incompatible Changes

  • This change modifies an existing class/function/struct/type definition in a public C header file or Python module
  • This change removes an existing class/function/struct/type from a public C header file or Python module

If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.

Review Status

Please provide details on any reviews related to this change and and the associated reviewers.

Merge request reports

Loading