ru.sscc.spline.analytic
Class GSplinePreparator

java.lang.Object
  |
  +--ru.sscc.spline.creator.SmoothingPreparator
        |
        +--ru.sscc.spline.analytic.GSplinePreparator

public class GSplinePreparator
extends SmoothingPreparator

The implementation of SmoothingPreparator for Duchon's spline.

See Also:
Serialized Form

Field Summary
protected  GSplineBody body
          The body of Duchon's spline.
protected  GreenSolver solver
          The solver.
 
Fields inherited from class ru.sscc.spline.creator.SmoothingPreparator
matrixMultiple, solverPrepared, sourceSize, weightMultiple, weights
 
Constructor Summary
GSplinePreparator(GSplineBody body)
          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.
 double getReductionAccuracy()
          Returns the reduction accuracy level.
 GreenSolver getSolver()
          Returns the solver used in the preparator or null if the solver is not prepared yet.
 void prepareSolver(double alpha)
          Prepares a solver for calculations with specified alpha.
 void setReductionAccuracy(double accuracy)
          Sets the reduction accuracy level affecting on making the decision ether the mesh is degenerate or not.
 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

body

protected GSplineBody body
The body of Duchon's spline.

solver

protected GreenSolver solver
The solver.
Constructor Detail

GSplinePreparator

public GSplinePreparator(GSplineBody body)
Constructor.
Parameters:
body - a spline body
Method Detail

setReductionAccuracy

public final void setReductionAccuracy(double accuracy)
Sets the reduction accuracy level affecting on making the decision ether the mesh is degenerate or not.

getReductionAccuracy

public final double getReductionAccuracy()
Returns the reduction accuracy level.

clone

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

prepareSolver

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

getSolver

public final GreenSolver 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