ru.sscc.spline.polynomial
Class OddSplinePreparator

java.lang.Object
  |
  +--ru.sscc.spline.creator.SmoothingPreparator
        |
        +--ru.sscc.spline.polynomial.OddSplinePreparator

public class OddSplinePreparator
extends SmoothingPreparator

The implementation of SmoothingPreparator for a polynomail spline of odd degree.

See Also:
Serialized Form

Field Summary
protected  MatrixPreparator preparator
          Preparator used for matrices calculation.
protected  CholeskyBandSolver solver
          Solver used for calculation.
 
Fields inherited from class ru.sscc.spline.creator.SmoothingPreparator
matrixMultiple, solverPrepared, sourceSize, weightMultiple, weights
 
Constructor Summary
OddSplinePreparator(SimpleMesh mesh, int order)
          Constructor.
 
Method Summary
 double calculationCost()
          Returns a number of arithmetic operations needed for calculation of spline coefficients.
 java.lang.Object clone()
          Returns a nonprepared clone.
 RectBandedMatrix getH()
          Returns the finite differences' matrix.
 CholeskyBandSolver getSolver()
          Returns the solver used in the preparator or null if the solver is not prepared yet.
 void prepareSolver(double alpha)
          Prepares a solver (CholeskyBandSolver in this case) for calculations with specified alpha.
 void solve(RealVector values, RealVector data, RealVector residual)
          Calculates spline coefficients and smoothing residual by interpolation values.
 
Methods inherited from class ru.sscc.spline.creator.SmoothingPreparator
ensureSolverPrepared, getAccuracy, getAlpha, isSolverPrepared, prepareMultiples, prepareWeights, residual, selectAlpha, setAccuracy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preparator

protected MatrixPreparator preparator
Preparator used for matrices calculation.

solver

protected CholeskyBandSolver solver
Solver used for calculation.
Constructor Detail

OddSplinePreparator

public OddSplinePreparator(SimpleMesh mesh,
                           int order)
Constructor.
Parameters:
mesh - a mesh of nodes
order - a difference order
Method Detail

clone

public java.lang.Object clone()
Returns a nonprepared clone.
Overrides:
clone in class SmoothingPreparator

getH

public RectBandedMatrix getH()
Returns the finite differences' matrix.

prepareSolver

public void prepareSolver(double alpha)
                   throws CalculatingException
Prepares a solver (CholeskyBandSolver in this case) for calculations with specified alpha. The value alpha = Double.POSITIVE_INFINITY is permitted.
Overrides:
prepareSolver in class SmoothingPreparator

getSolver

public final CholeskyBandSolver getSolver()
Returns the solver used in the preparator or null if the solver is not prepared yet.

solve

public void solve(RealVector values,
                  RealVector data,
                  RealVector residual)
Calculates spline coefficients and smoothing residual by interpolation values.
Overrides:
solve in class SmoothingPreparator
Parameters:
values - interpolation values at mesh nodes
data - a vector to store spline coefficients
residual - a vector to store residual (if it is equal to null, the residual is not needed)

calculationCost

public double calculationCost()
Returns a number of arithmetic operations needed for calculation of spline coefficients.
Overrides:
calculationCost in class SmoothingPreparator