Package ru.sscc.spline

Basic spline approximation classes.

See:
          Description

Interface Summary
SplineBody An abstract spline body interface.
 

Class Summary
BaseSpline The parent class for all splines.
Spline The class supports a 1D or multi-D spline value calculation in any point of the space of independent variables.
Splines The class supports a vector function consisting of splines having the same body (eg the bearing mesh and degree parameters must be the same for all splines in the vector).
SplineWorkspace An auxiliary class for use in spline values calculations.
 

Package ru.sscc.spline Description

Basic spline approximation classes. The spline is a function s(x) in the space Rm of m-dimensional points x = (x0,¼,xm-1). It is usually presented as a linear combination of some basic functions called the spline base. The coefficients of this combination are called by spline coefficients. Two splines constructed upon the same spline base differ in their coefficients only.

Every spline consists of three parts:

  1. An instance of the SplineBody interface is responsible for the calculation of spline values or derivatives at the points of the space Rm of independent variables. It usually contains the information on mesh nodes used for the construction of the spline, the order of spline, etc.

  2. The spline coefficients are stored separately to the spline body, in an instance of the RealContainer class.

  3. An instance of the SplineWorkspace is the temporary storage for all auxiliary information needed in the process of the spline value calculation. For example, when we calculate the value of 1D spline, the workspace contains the number of mesh cell to which the current point belongs. So, when the calculation in other point needed, the mesh cell search algorithm at first tests the mesh cell found in the previous call and, if the test fails, then performs the binary search in the mesh array. The workspace is the transient object. It may be deleted without any influence to the work of the spline instance. We call the spline having the null workspace to be flushed.

The BaseSpline class is the basic class for all splines. It implements the following operations:

The coefficients container contains coefficients of one or many splines, respectively to the class, created it. Two subclasses, the Spline and Splines, are designed for this purpose: the first class performs operations with a unique spline, and the last class performs operations with many splines constructed on the same spline body.

Both subclasses have a number of value() operations intended for the calculation of spline(s) value or derivative at a point required. If the 1D spline is constructed, you can use any variant of the value() operation. But, for multi-D splines, only multi-D variants are accessible. If the calculation cannot be done for the parameters specified, the IllegalArgumentException will be thrown.

All splines are serializable objects.