ru.sscc.spline
Class Splines

java.lang.Object
  |
  +--ru.sscc.spline.BaseSpline
        |
        +--ru.sscc.spline.Splines

public class Splines
extends BaseSpline

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). The individual and vector variants of spline value calculations are supported. If the space of independent variables is the 1D, a derivative calculation is also possible if the spline body permits this operation.

See Also:
Serialized Form

Field Summary
 int count
          A number of splines in the spline vector.
 
Fields inherited from class ru.sscc.spline.BaseSpline
body, data, workspace
 
Constructor Summary
Splines(SplineBody body, int count)
          Constructor (creates spline coefficients container).
Splines(SplineBody body, RealContainer data, int count)
          Constructor.
 
Method Summary
 RealVector getVector(int i)
          Returns coefficients vector for i-th spline (splines are counted from zero).
 double value(int i, double point)
          Calculates an i-th spline value at a point required.
 double value(int i, double point, int index)
          Calculates an i-th spline derivative at a point required.
 double value(int i, RealPointer point)
          Calculates an i-th spline value at a point required.
 RealPointer values(RealPointer vector, double point)
          Calculates a spline vector at a point required.
 RealPointer values(RealPointer vector, double point, int index)
          Calculates a derivative of spline vector at a point required.
 RealPointer values(RealPointer vector, RealPointer point)
          Calculates a spline vector at a point required.
 
Methods inherited from class ru.sscc.spline.BaseSpline
clone, dimension, flush, getBody, getContainer, prepareWorkspace, prepareWorkspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

public final int count
A number of splines in the spline vector.
Constructor Detail

Splines

public Splines(SplineBody body,
               int count)
Constructor (creates spline coefficients container).
Parameters:
body - a spline body
count - a number of splines in the vector

Splines

public Splines(SplineBody body,
               RealContainer data,
               int count)
Constructor. Spline coefficients in the container are ordered in the same manner as in RealVectors class: the vector of the first coefficients of each spline, then the vector of the second coefficients, and so on.
Parameters:
body - a spline body
data - a splines coefficients container
count - a number of splines in the vector
Method Detail

getVector

public final RealVector getVector(int i)
Returns coefficients vector for i-th spline (splines are counted from zero).

value

public final double value(int i,
                          double point)
Calculates an i-th spline value at a point required. May be used for 1D splines only.
Parameters:
i - a zero base number of spline to calculate
point - a point on the real axis
Returns:
the i-th spline value

value

public double value(int i,
                    double point,
                    int index)
Calculates an i-th spline derivative 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.
Parameters:
i - a zero base number of spline to calculate
point - a point on the real axis
index - a derivative index
Returns:
the i-th spline derivative value

value

public double value(int i,
                    RealPointer point)
Calculates an i-th spline value at a point required. May be used for any (1D or multi-D) spline. A point vector means a point in the space of independent variables.
Parameters:
i - a zero base number of spline to calculate
point - a point in the space of independent variables
Returns:
the i-th spline partial derivative value

values

public final RealPointer values(RealPointer vector,
                                double point)
Calculates a spline vector at a point required. May be used for spline vector with one independent variable only.
Parameters:
vector - a pointer to store the result
point - a point on the real axis
Returns:
the spline vector (the same pointer as vector parameter)

values

public RealPointer values(RealPointer vector,
                          double point,
                          int index)
Calculates a derivative of spline vector at a point required. May be used for spline vector with one independent variable 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.
Parameters:
vector - a pointer to store the result
point - a point on the real axis
index - a derivative index
Returns:
the spline vector derivative (the same pointer as vector parameter)

values

public RealPointer values(RealPointer vector,
                          RealPointer point)
Calculates a spline vector at a point required. May be used for any (1D or multi-D) spline vectors. A point vector means a point in the space of independent variables.
Parameters:
vector - a pointer to store the result
point - a point in the space of independent variables
Returns:
the spline vector (the same pointer as vector parameter)