
B-spline basis by the Cox-de Boor recursion
Source:R/abundance_text_voting_native.R
morie_bspline_basis.RdEqually spaced interior knots with boundary knots repeated
degree + 1 times, so the basis spans the interval and sums to one.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_bspline_basis(V)
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] 1 0.000000000 0.0000000 0.00000000 0.00000000 0.0000000 0.0000000000
#> [2,] 0 0.005830904 0.3367347 0.59669582 0.06073858 0.0000000 0.0000000000
#> [3,] 0 0.000000000 0.0000000 0.03109815 0.52235180 0.4334305 0.0131195335
#> [4,] 0 0.000000000 0.0000000 0.00000000 0.00000000 0.1049563 0.6477162293
#> [5,] 0 0.000000000 0.0000000 0.00000000 0.00000000 0.0000000 0.0004859086
#> [6,] 0 0.000000000 0.0000000 0.00000000 0.00000000 0.0000000 0.0000000000
#> [7,] 0 0.000000000 0.0000000 0.00000000 0.00000000 0.0000000 0.0000000000
#> [8,] 0 0.000000000 0.0000000 0.00000000 0.00000000 0.0000000 0.0000000000
#> [,8] [,9] [,10] [,11] [,12] [,13]
#> [1,] 0.0000000 0.0000000000 0.0000000 0.00000000 0.00000000 0.0000000
#> [2,] 0.0000000 0.0000000000 0.0000000 0.00000000 0.00000000 0.0000000
#> [3,] 0.0000000 0.0000000000 0.0000000 0.00000000 0.00000000 0.0000000
#> [4,] 0.2468416 0.0004859086 0.0000000 0.00000000 0.00000000 0.0000000
#> [5,] 0.2468416 0.6477162293 0.1049563 0.00000000 0.00000000 0.0000000
#> [6,] 0.0000000 0.0131195335 0.4334305 0.52235180 0.03109815 0.0000000
#> [7,] 0.0000000 0.0000000000 0.0000000 0.06073858 0.59669582 0.3367347
#> [8,] 0.0000000 0.0000000000 0.0000000 0.00000000 0.00000000 0.0000000
#> [,14] [,15]
#> [1,] 0.000000000 0
#> [2,] 0.000000000 0
#> [3,] 0.000000000 0
#> [4,] 0.000000000 0
#> [5,] 0.000000000 0
#> [6,] 0.000000000 0
#> [7,] 0.005830904 0
#> [8,] 0.000000000 1