Rational |
public class RationalCubicSpline : CurveBase, IInterpolationFunction, IInterpolationCurve
The RationalCubicSpline type exposes the following members.
Name | Description | |
---|---|---|
RationalCubicSpline | Initializes a new instance of the RationalCubicSpline class |
Name | Description | |
---|---|---|
Smoothing | Set the value of the smoothing paramenter. A value of p = 0 for the smoothing parameter results in a standard cubic spline. A value of p with -1 < p < 0 results in "unsmoothing" that means overshooting oscillations. A value of p with p > 0 gives increasing smoothness. p to infinity results in a linear interpolation. A value smaller or equal to -1.0 leads to an error. |
Name | Description | |
---|---|---|
CubicSplineCoefficients |
Calculate the spline coefficients y2(i) and y3(i) for a natural cubic
spline, given the abscissa x(i), the ordinate y(i), and the 1st
derivative y1(i).
(Inherited from CurveBase) | |
CubicSplineHorner |
Return the interpolation value P(u) for a piecewise cubic curve determined
by the abscissa vector x, the ordinate vector y, the 1st derivative
vector y1, the 2nd derivative vector y2, and the 3rd derivative vector y3,
using the Horner scheme.
(Inherited from CurveBase) | |
CubicSplineHorner1stDerivative | (Inherited from CurveBase) | |
Differences | Calculate difference vector dx(i) from vector x(i) and assure that x(i) is strictly monotone increasing or decreasing. Can be called with both arguments the same vector in order to do it inplace! | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetBoundaryConditions | Gets the boundary condition and the two condition parameters. | |
GetBoundaryConditions(Double, Double) | Gets the boundary condition and the two condition parameters. | |
GetCurvePoints |
Get curve points to draw an interpolation curve between the abscissa values xlo and xhi.
It calls the virtual methods MpCurveBase::GetXOfU() and GetYOfU() to obtain the
interpolation values. Note, that before method DrawCurve() can be called
the method Interpolate() must have been called. Otherwise, not interpolation
is available.
(Inherited from CurveBase) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
GetXOfU | (Overrides CurveBaseGetXOfU(Double)) | |
GetYOfU | (Overrides CurveBaseGetYOfU(Double)) | |
GetYOfX | ||
Interpolate | (Overrides CurveBaseInterpolate(IReadOnlyListDouble, IReadOnlyListDouble)) | |
InverseDifferences | Calculate inverse difference vector dx(i) from vector x(i) and assure that x(i) is strictly monotone increasing or decreasing. Can be called with both arguments the same vector in order to do it inplace! | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
Parametrize |
Curve length parametrization. Returns the accumulated "distances"
between the points (x(i),y(i)) and (x(i+1),y(i+1)) in t(i+1)
for i = lo ... hi. t(lo) = 0.0 always.
(Inherited from CurveBase) | |
SetBoundaryConditions | Sets the boundary conditions. | |
SplineA | ||
SplineB1 | ||
SplineB2 | ||
SplineC1 | ||
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
a | ||
b | ||
boundary | ||
c | ||
d | ||
dx | ||
dy | ||
p | ||
r1 | ||
r2 | ||
x | Reference to the vector of the independent variable. (Inherited from CurveBase) | |
y | Reference to the vector of the dependent variable. (Inherited from CurveBase) |
The basis functions for rational cubic splines are g1 = u g2 = t with t = (x - x(i)) / (x(i+1) - x(i)) g3 = u^3 / (p*t + 1) u = 1 - t g4 = t^3 / (p*u + 1) A rational spline with coefficients a(i),b(i),c(i),d(i) is determined by f(i)(x) = a(i)*g1 + b(i)*g2 + c(i)*g3 + d(i)*g4 Choosing the smoothing parameter p: ----------------------------------- Use the method void MpRationalCubicSpline::SetSmoothing (double smoothing) to set the value of the smoothing paramenter. A value of p = 0 for the smoothing parameter results in a standard cubic spline. A value of p with -1 < p < 0 results in "unsmoothing" that means overshooting oscillations. A value of p with p > 0 gives increasing smoothness. p to infinity results in a linear interpolation. A value smaller or equal to -1.0 leads to an error. Choosing the boundary conditions: --------------------------------- Use the method void MpRationalCubicSpline::SetBoundaryConditions (int boundary, double b1, double b2) to set the boundary conditions. The following values are possible: Natural natural boundaries, that means the 2nd derivatives are zero at both boundaries. This is the default value. FiniteDifferences use finite difference approximation for 1st derivatives. Supply1stDerivative user supplied values for 1st derivatives are given in b1 and b2 i.e. f'(x_lo) in b1 f'(x_hi) in b2 Supply2ndDerivative user supplied values for 2nd derivatives are given in b1 and b2 i.e. f''(x_lo) in b1 f''(x_hi) in b2 Periodic periodic boundary conditions for periodic curves or functions. NOT YET IMPLEMENTED IN THIS VERSION. If the parameters b1,b2 are omitted the default value is 0.0. Input parameters: ----------------- Vector x(lo,hi) The abscissa vector Vector y(lo,hi) The ordinata vector If the spline is not parametric then the abscissa must be strictly monotone increasing or decreasing! References: ----------- Dr.rer.nat. Helmuth Spaeth, Spline-Algorithmen zur Konstruktion glatter Kurven und Flaechen, 3. Auflage, R. Oldenburg Verlag, Muenchen, Wien, 1983.