ru.sscc.spline.polynomial
Class PSplineCalculator
java.lang.Object
|
+--ru.sscc.spline.polynomial.PSplineCalculator
- public class PSplineCalculator
- extends java.lang.Object
- implements java.io.Serializable
The calculator of the polynomial representation for 1D spline.
Calculates the representation from the values of spline at mesh nodes
and the coefficients of B-spline representation for m-th derivative.
- See Also:
- Serialized Form
Field Summary |
protected PSplineBody |
body
The body of spline (mesh and spline degrees are used). |
protected RectBandedMatrix |
h
The matrix needed for the calculation of upper derivatives. |
Method Summary |
protected void |
calcDFg(RealVector lambda,
RealVector target)
Calculates upper derivatives of spline representation. |
protected void |
calcDFl(RealVector f,
RealVector target)
Calculates lower derivatives of spline representation. |
void |
calculate(RealVector lambda,
RealVector f,
RealVector target)
Calculates the polynomial representation of a polynomial spline at
mesh nodes. |
double |
calculationCost()
Returns a number of arithmetic operations needed for
calculation of a spline representation. |
static void |
recalculate(double[] p,
double[] q,
double point,
int size,
int count)
Recalculates teilor representation of a polynomial relative to a
required point. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
h
protected RectBandedMatrix h
- The matrix needed for the calculation of upper derivatives.
body
protected PSplineBody body
- The body of spline (mesh and spline degrees are used).
PSplineCalculator
public PSplineCalculator(PSplineBody body,
RectBandedMatrix h)
- Constructor.
- Parameters:
body
- polynomial spline bodyh
- matrix of finite differences
calculationCost
public double calculationCost()
- Returns a number of arithmetic operations needed for
calculation of a spline representation.
calculate
public void calculate(RealVector lambda,
RealVector f,
RealVector target)
- Calculates the polynomial representation of a polynomial spline at
mesh nodes.
- Parameters:
lambda
- B-spline representation coefficients for m-th derivative
of splinef
- spline values at mesh nodestarget
- a vector to store the result
calcDFg
protected void calcDFg(RealVector lambda,
RealVector target)
- Calculates upper derivatives of spline representation.
- Parameters:
lambda
- B-spline representation coefficients for m-th derivative
of splinetarget
- a vector to store the result as teilor representaion
calcDFl
protected void calcDFl(RealVector f,
RealVector target)
- Calculates lower derivatives of spline representation.
- Parameters:
f
- spline values at mesh nodestarget
- a vector to store the result as teilor representaion
recalculate
public static void recalculate(double[] p,
double[] q,
double point,
int size,
int count)
- Recalculates teilor representation of a polynomial relative to a
required point.
- Parameters:
p
- teilor representation coefficients in increasing orderq
- a vector to store the resultpoint
- a point to recalculate the representation insize
- a number of teilor coefficients in p
(polynomial degree + 1)count
- a number of teilor coefficients to calculate