Skip to contents

Computes the scaling factor required to normalise a B-spline basis function, using its truncated power expansion, such that the basis integrates to 1 over its support.

Usage

bspline_normalisation_constant(knots, i, k)

Arguments

knots

A numeric vector of knots.

i

An integer index indicating the position in the knot sequence for which to compute the coefficients.

k

The degree of the B-spline basis function (must be 0, 1, or 2).

Value

A numeric scalar giving the inverse of the integral under the truncated power representation - i.e., a multiplicative constant \(Z^{-1}\) that makes the basis function integrate to 1.

Details

This function uses bspline_alpha_rule to compute the coefficients \(\alpha_j\) for the truncated power expansion, and integrates over the support.

Examples

knots <- c(0, 1, 2, 3, 4, 5)
bspline_normalisation_constant(knots, i = 1, k = 1)
#> [1] 1