SplineBasis-class {orthogonalsplinebasis} | R Documentation |
Classes SplineBasis
and OrthogonalSplineBasis
Description
Contains the matrix representation for spline basis functions. The OrthogonalSplineBasis
class has the basis functions orthogonalized.
Objects from the Class
Objects can be created by calls of the form SplineBasis(knots, order)
or to generate orthogonal spline basis functions directly OrthogonalSplineBasis(knots, order)
or the short version OBasis(knots,order)
.
Slots
transformation
:Object of class
"matrix"
Only applicable onOrthogonalSplineBasis
class, shows the transformation matrix use to get from regular basis functions to orthogonal basis functions.knots
:Object of class
"numeric"
order
:Object of class
"integer"
Matrices
:Object of class
"array"
Methods
- deriv
signature(expr = "SplineBasis")
: Computes the derivative of the basis functions. Returns an object of classSplineBasis
.- dim
signature(x = "SplineBasis")
: gives the dim as the order and number of basis functions. Returns numeric of length 2.- evaluate
signature(object = "SplineBasis", x = "numeric")
: Evaluates the basis functions and the points provided in x. Returns a matrix withlength(x)
rows anddim(object)[2]
columns.- integrate
signature(object = "SplineBasis")
: computes the integral of the basis functions defined by\int\limits_{k_0}^x b(t)dt
wherek_0
is the first knot. Returns an object of classSplineBasis
.- orthogonalize
signature(object = "SplineBasis")
: Takes in aSplineBasis
object, computes the orthogonalization transformation and returns an object of classOrthogonalSplineBasis
.- plot
signature(x = "SplineBasis", y = "missing")
: Takes an object of classSplineBasis
and plots the basis functions for the domain defined by the knots in object.- plot
signature(x = "SplineBasis", y = "vector")
: Interprets y as a vector of coefficients and plots the resulting curve.- plot
signature(x = "SplineBasis", y = "matrix")
: Interprets y as a matrix of coefficients and plots the resulting curves.
References
General matrix representations for B-splines Kaihuai Qin, The Visual Computer 2000 16:177–186
See Also
Examples
showClass("SplineBasis")
knots<-c(0,0,0,0:5,5,5,5)
(base <-SplineBasis(knots))
(obase<-OBasis(knots))
plot(base)
plot(obase)