ru.sscc.spline
Class BaseSpline

java.lang.Object
  |
  +--ru.sscc.spline.BaseSpline
Direct Known Subclasses:
Spline, Splines

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

The parent class for all splines. It consists of 3 parts: a spline body is a constant part of spline shared by another splines and never modified on spline's life cycle; a spline data is a spline coefficients vector (nonmodified and nonshared); a spline workspace is a spline working area (contains only nonshared temporary information needed for spline value calculation).

See Also:
Serialized Form

Field Summary
protected  SplineBody body
          A spline body.
protected  RealContainer data
          A container for spline coefficients.
protected  SplineWorkspace workspace
          A spline workspace
 
Constructor Summary
protected BaseSpline(SplineBody body, RealContainer data)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clones the spline.
 int dimension()
          Return a spline dimension (a number of independent variables).
 void flush()
          Deletes workspace.
 SplineBody getBody()
          Returns the spline body.
 RealContainer getContainer()
          Returns the spline coefficients container.
protected  void prepareWorkspace(double point, int index, int count)
          Prepares the workspace for an 1D spline derivative calculation at a point required.
protected  void prepareWorkspace(RealPointer point, int count)
          Prepares the workspace for a spline calculation at a point required.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workspace

protected transient SplineWorkspace workspace
A spline workspace

data

protected RealContainer data
A container for spline coefficients.

body

protected SplineBody body
A spline body.
Constructor Detail

BaseSpline

protected BaseSpline(SplineBody body,
                     RealContainer data)
Constructor.
Parameters:
body - a spline body
data - a spline coefficients container
Method Detail

dimension

public final int dimension()
Return a spline dimension (a number of independent variables).

flush

public final void flush()
Deletes workspace.

getBody

public final SplineBody getBody()
Returns the spline body.

getContainer

public final RealContainer getContainer()
Returns the spline coefficients container.

clone

public java.lang.Object clone()
Clones the spline.
Overrides:
clone in class java.lang.Object
Returns:
clone of this spline

prepareWorkspace

protected void prepareWorkspace(double point,
                                int index,
                                int count)
Prepares the workspace for an 1D spline derivative calculation at a point required. May be used for 1D splines only. A point is a point on the real axis and an index is a derivative index to be calculated. index=0 means a spline value calculation. A count parameter is an information on how many spline values will be later calculated for these parameters.
Parameters:
point - a point on the real axis
index - a derivative index
count - a number of splines will be calculated later

prepareWorkspace

protected void prepareWorkspace(RealPointer point,
                                int count)
Prepares the workspace for a spline calculation at a point required. May be used for any (1D or multi-D) splines. A point vector means a point in the space of independent variables where a calculation should be processed. A count parameter is an information on how many spline values will be later calculated for these parameters.
Parameters:
point - a point in the space of independent variables
count - a number of splines will be calculated later