ru.sscc.spline.creator
Class SplineCreator

java.lang.Object
  |
  +--ru.sscc.spline.creator.SplineCreator
Direct Known Subclasses:
SmoothingSplineCreator

public abstract class SplineCreator
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

An abstract parent class for all spline creators.

See Also:
Serialized Form

Constructor Summary
protected SplineCreator()
          Default constructor.
 
Method Summary
protected  void attachSplineBody(SplineBody body)
          Attaches a spline body to the creator and sets the prepared tag to false.
abstract  void calculate(RealVector source, RealVector target)
          A basic master's method that calculates spline coefficients using a source of interpolating data.
abstract  double calculationCost()
          Returns a number of operations needed for calculation of one spline coefficients vector.
 java.lang.Object clone()
          Should return nonprepared clone of the creator.
 Spline constructSpline(RealVector source)
          Constructs a spline via its interpolating data coefficients.
 Splines constructSplinesByColumns(RealVectors source)
          Constructs a spline vector via its interpolating data coefficients represented by columns of a RealVectors array.
 Splines constructSplinesByRows(RealVectors source)
          Constructs a spline vector via its interpolating data coefficients represented by rows of a RealVectors array.
 void ensurePrepared()
          Ensures the creator prepared.
 SplineBody getSplineBody()
          Returns the spline body.
 boolean isPrepared()
          Returns true if the creator is prepared.
protected  void setPrepared(boolean prepared)
          Sets the value of prepared tag.
abstract  int sourceSize()
          Returns a size of an interpolating data vector.
 int targetSize()
          Returns a size of a spline coefficients vector.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplineCreator

protected SplineCreator()
Default constructor.
Method Detail

attachSplineBody

protected void attachSplineBody(SplineBody body)
Attaches a spline body to the creator and sets the prepared tag to false.
Parameters:
body - a spline body to attach

clone

public java.lang.Object clone()
Should return nonprepared clone of the creator.
Overrides:
clone in class java.lang.Object

getSplineBody

public final SplineBody getSplineBody()
Returns the spline body.

sourceSize

public abstract int sourceSize()
Returns a size of an interpolating data vector.

targetSize

public final int targetSize()
Returns a size of a spline coefficients vector.

setPrepared

protected final void setPrepared(boolean prepared)
Sets the value of prepared tag.

isPrepared

public final boolean isPrepared()
Returns true if the creator is prepared.

ensurePrepared

public final void ensurePrepared()
Ensures the creator prepared. If not, the IllegalStateException is thrown.

calculate

public abstract void calculate(RealVector source,
                               RealVector target)
A basic master's method that calculates spline coefficients using a source of interpolating data.
Parameters:
source - an interpolating data vector
target - a resulting spline coefficients vector

calculationCost

public abstract double calculationCost()
Returns a number of operations needed for calculation of one spline coefficients vector.

constructSpline

public final Spline constructSpline(RealVector source)
Constructs a spline via its interpolating data coefficients.
Parameters:
source - an interpolating data
Returns:
the spline constructed

constructSplinesByColumns

public final Splines constructSplinesByColumns(RealVectors source)
Constructs a spline vector via its interpolating data coefficients represented by columns of a RealVectors array.
Parameters:
source - an array of interpolated vectors
Returns:
the spline vector

constructSplinesByRows

public final Splines constructSplinesByRows(RealVectors source)
Constructs a spline vector via its interpolating data coefficients represented by rows of a RealVectors array.
Parameters:
source - an array of interpolated vectors
Returns:
the spline vector