| Splinets-class {Splinets} | R Documentation |
The class to represent a collection of splines
Description
The main class in the splinets-package used for representing a collection of splines.
Value
running new("Splinets") return an object that belongs to the class Splinets, with the initialization of the default
values for the fields.
Slots
knotsnumeric
n+2vector, a vector of n+2 knot locations presented in the increasing order and without ties;smordernon-negative integer, the smoothnes order of the splines, i.e. the highest order of non-zero derivative;
equidlogical, indicates if the knots are equidistant; Some computations in the equidistant case are simpler so this information helps to account for it.
supplist (of matrices),
-
length(supp)==0– the full support set for all splines, -
length(supp)==N– support sets forNsplines;
If non-empty, a list containing
Nsupp x 2matrices (of positive integers). IfNsuppis equal to one it should be a row matrix (not a vector). The rows in the matrices,supp[[i]][l,],l in 1:Nsupprepresents the indices of the knots that are the endpoints of the intervals in the support sets. Each of the support set is represented as a union of disjointNsuppintervals, with knots as the endpoints. Outside the set (support), the spline vanishes. Each matrix in this list is ordered so the rows closer to the top correspond to the intervals closer to the LHS end of the support.-
derlist (of matrices); a list of the length
Ncontainingsum(supp[[i]][,2]-supp[[i]][,1]+1) x (smorder+1)matrices, whereiis the index running through the list. Each matrix in the list includes the values of the derivatives at the knots in the support of the corresponding spline.taylor(n+1) x (smorder+1), ifequid=FALSE, or1 x (smorder+1)ifequid=TRUE, columnwise vectors of the Taylor expansion coefficients at the knots; Vectors instead of matrices are recognized properly. The knot and order dependent matrix of rows of coefficients used in the Taylor expansion of splines. Once evaluated it can be used in computations for any spline of the given order over the given knots. The columns of this matrix are used for evaluation of the values of the splines in-between knots, see the references for further details.typestring, one of the following character strings:
bs,gsob,twob,dspnt,spnt,sp; The default isspwhich indicates any unstructured collection of splines. The rest of the strings indicate different spline bases:-
bsfor B-splines, -
gsobfor Gram-Schmidt O-splines, -
twobfor two-sided O-splines, -
dspntfor a fully dyadic splinet, -
spntfor a non-dyadic splinet.
-
periodiclogical, indicates if the B-splines are periodic or not.
epsilonnumeric (positive), an accuracy used to detect a problem with the conditions required for the matrix of the derivatives (controls relative deviation from the conditions);
References
Liu, X., Nassar, H., Podg\mbox{\'o}rski, K. "Dyadic diagonalization of positive definite band matrices and efficient B-spline orthogonalization." Journal of Computational and Applied Mathematics (2022) <https://doi.org/10.1016/j.cam.2022.114444>.
Podg\mbox{\'o}rski, K. (2021)
"Splinets – splines through the Taylor expansion, their support sets and orthogonal bases." <arXiv:2102.00733>.
Nassar, H., Podg\mbox{\'o}rski, K. (2023) "Splinets 1.5.0 – Periodic Splinets." <arXiv:2302.07552>
See Also
is.splinets for evaluation of a Splinets-object; construct for constructing a Splinets-object;
plot,Splinets-method for plotting methods for Splinets-objects;
Examples
#-------------------------------------------------------------#
#-------Generating an object from the class 'Splinets'--------#
#-------------------------------------------------------------#
#The most generic generation of an object of class 'Splinets':
sp=new("Splinets") #a generic format for 'Splinets' object
sp
#The most important SLOTs of 'Splinets' - the default values
sp@knots
sp@smorder
sp@der
sp@supp
set.seed(5); n=13; xi=sort(runif(n+2)); xi[1]=0;xi[n+2]=1
sp@knots=xi #randomly assigned knots
#Changing the order of
#smoothness and intializing Taylor coefficients
ssp=new("Splinets",knots=xi,smorder=2)
ssp@taylor
#Equidistant case
ssp=new("Splinets",knots=seq(0,1,1/(n+1)),smorder=3)
ssp@taylor
ssp@equid