Splinets-class: The class to represent a collection of splines

Splinets-classR 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

knots

numeric n+2 vector, a vector of n+2 knot locations presented in the increasing order and without ties;

smorder

non-negative integer, the smoothnes order of the splines, i.e. the highest order of non-zero derivative;

equid

logical, indicates if the knots are equidistant; Some computations in the equidistant case are simpler so this information helps to account for it.

supp

list (of matrices),

  • length(supp)==0 – the full support set for all splines,

  • length(supp)==N – support sets for N splines;

If non-empty, a list containing Nsupp x 2 matrices (of positive integers). If Nsupp is equal to one it should be a row matrix (not a vector). The rows in the matrices, supp[[i]][l,], l in 1:Nsupp represents 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 disjoint Nsupp intervals, 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.

der

list (of matrices); a list of the length N containing sum(supp[[i]][,2]-supp[[i]][,1]+1) x (smorder+1) matrices, where i is 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), if equid=FALSE, or 1 x (smorder+1) if equid=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.

type

string, one of the following character strings: bs,gsob,twob,dspnt,spnt,sp; The default is sp which indicates any unstructured collection of splines. The rest of the strings indicate different spline bases:

  • bs for B-splines,

  • gsob for Gram-Schmidt O-splines,

  • twob for two-sided O-splines,

  • dspnt for a fully dyadic splinet,

  • spnt for a non-dyadic splinet.

periodic

logical, indicates if the B-splines are periodic or not.

epsilon

numeric (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., Podgorski, 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>.

Podgorski, K. (2021) "Splinets – splines through the Taylor expansion, their support sets and orthogonal bases." <arXiv:2102.00733>.

Nassar, H., Podgorski, 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

Splinets documentation built on March 7, 2023, 8:24 p.m.