JMSLTM Numerical Library 5.0.1

com.imsl.math
Class CsPeriodic

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

public class CsPeriodic
extends Spline

Extension of the Spline class to interpolate data points with periodic boundary conditions.

Class CsPeriodic computes a C^2 cubic spline interpolant to a set of data points (x_i, f_i) for i =0,ldots n-1. The breakpoints of the spline are the abscissas. The program enforces periodic endpoint conditions. This means that the spline s satisfies s(a) = s(b), {it{s'}}left( {it{a}} right) = {it{s'}}left( {it{b}} 
  right), and s''left( a right) = s''left( b 
  right), where a is the leftmost abscissa and b is the rightmost abscissa. If the ordinate values corresponding to a and b are not equal, then a warning message is issued. The ordinate value at b is set equal to the ordinate value at a and the interpolant is computed.

If the data points arise from the values of a smooth (say C^4) periodic function f, i.e. f_i = f(x_i), then the error will behave in a predictable fashion. Let xi be the breakpoint vector for the above spline interpolant. Then, the maximum absolute error satisfies

|f-s|_{[xi_0,xi_{n-1}]} le C |f^{(4)}|_{[{xi_0 ,xi_{n-1} }]} |xi|^4

where

|xi|;: = max_{i=1,ldots,n-1} |xi_i - xi_{i - 1} |

For more details, see de Boor (1978, pages 320-322).

See Also:
Example, Serialized Form

Field Summary
 
Fields inherited from class com.imsl.math.Spline
breakPoint, coef, EPSILON_LARGE
 
Constructor Summary
CsPeriodic(double[] xData, double[] yData)
          Constructs a cubic spline that interpolates the given data points with periodic boundary conditions.
 
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

CsPeriodic

public CsPeriodic(double[] xData,
                  double[] yData)
Constructs a cubic spline that interpolates the given data points with periodic boundary conditions.

Parameters:
xData - A double array containing the x-coordinates of the data. There must be at least 4 data points and 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.

JMSLTM Numerical Library 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.