Package ru.sscc.spline.creator

The collection of auxiliary classes used in spline creation.

See:
          Description

Class Summary
SmoothingPreparator The basic class for all spline preparators that use smoothing algorithm.
SmoothingSplineCreator An abstract parent class for all spline creators that support the selection of smoothing parameter with SmoothingPreparator.
SplineCreator An abstract parent class for all spline creators.
 

Package ru.sscc.spline.creator Description

The collection of auxiliary classes used in spline creation.

Spline Creator

The SplineCreator class is the basic class for all spline creators. A spline creator is responsible for the construction of a spline. The construction of a spline creator always starts from the creation of the required spline body. Then some actions need to be executed to prepare the spline creator: the matrix of SLAE is created and factorized, auxiliary instances are prepared and so on. When the spline creator is prepared, it is ready for the calculation of spline coefficients. This work will be done by the calculate(source,target) method. Using this method, the creator may construct splines by many ways: the constructSpline(data) method constructs a spline by the measurements vector; the constructSplinesByRows(datas) and constructSplinesByColumns(datas) methods construct many splines simultaneously using the measurements prepared as an array of the RealVectors type.

Smoothing Preparator

The SmoothingPreparator class implements the optimal choice of the smoothing parameter a finding the solution of the weighted residual criterion equation

n-1
å
i = 0 
wi-1(fi-s(xi))2 = e2,
by the Newton method combined with the Rational Interpolation method. The solution of this equation is usually found in 3-5 steps with high accuracy. You can set the accuracy level by the static SmoothingPreparator.setAccuracy(delta) method. The default accuracy is equal to 0.1.

Smoothing Spline Creator

The SmoothingSplineCreator class extends the SplineCreator. It is the basic class for all spline creators using the SmoothingPreparator for spline construction. The calculate(source,target,epsilon) method is added to calculate spline coefficients using the residual criterion with the epsilon level. It isn't necessary for the creator to be prepared here.

Two variants of the spline construction methods are added: the constructSpline(data,epsilon) and general constructSpline(data,epsilon,weights).

To prepare the creator for the construction of splines, the methods prepareWeights(weights) and prepareSolver(alpha) are used. The first method sets the vector of weights for smoothing and the last method prepares the internal solver for the spline construction with specified smoothing parameter alpha. The prepareWeights method changes the creator state to non-prepared. So, the prepareSolver method must be called after it.