JMSLTM Numerical Library 6.1

com.imsl.math
Class CsShape

java.lang.Object
  extended by com.imsl.math.Spline
      extended by com.imsl.math.CsShape
All Implemented Interfaces:
Serializable, Cloneable

public class CsShape
extends Spline

Extension of the Spline class to interpolate data points consistent with the concavity of the data.

Class CsShape computes a cubic spline interpolant to n data points {x_i, f_i} for i = 0, ldots, n-1. For ease of explanation, we will assume that x_i lt x_{i+1}, although it is not necessary for the user to sort these data values. If the data are strictly convex, then the computed spline is convex, C^2, and minimizes the expression

int_{x_1 }^{x_n } {left( {g''} right)} ^2

over all convex C ^1 functions that interpolate the data. In the general case when the data have both convex and concave regions, the convexity of the spline is consistent with the data and the above integral is minimized under the appropriate constraints. For more information on this interpolation scheme, we refer the reader to Micchelli et al. (1985) and Irvine et al. (1986).

One important feature of the splines produced by this class is that it is not possible, a priori, to predict the number of breakpoints of the resulting interpolant. In most cases, there will be breakpoints at places other than data locations. The method is nonlinear; and although the interpolant is a piecewise cubic, cubic polynomials are not reproduced. (However, linear polynomials are reproduced.) This routine should be used when it is important to preserve the convex and concave regions implied by the data.

See Also:
Example, Serialized Form

Nested Class Summary
static class CsShape.TooManyIterationsException
          Too many iterations.
 
Field Summary
 
Fields inherited from class com.imsl.math.Spline
breakPoint, coef, EPSILON_LARGE
 
Constructor Summary
CsShape(double[] xData, double[] yData)
          Construct a cubic spline interpolant which is consistent with the concavity of the data.
 
Method Summary
 
Methods inherited from class com.imsl.math.Spline
copyAndSortData, copyAndSortData, derivative, derivative, derivative, getBreakpoints, integral, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CsShape

public CsShape(double[] xData,
               double[] yData)
        throws CsShape.TooManyIterationsException,
               SingularMatrixException
Construct a cubic spline interpolant which is consistent with the concavity of the data.

Parameters:
xData - A double array containing the x-coordinates of the data. Values must be distinct.
yData - A double array containing the y-coordinates of the data. The arrays xData and yData must have the same length.
Throws:
CsShape.TooManyIterationsException
SingularMatrixException

JMSLTM Numerical Library 6.1

Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.