package com.imsl.test.example.math; import com.imsl.math.*; /** *

* Computes a shape preserving cubic spline.

* * A cubic spline interpolant to a function is computed consistent with the * concavity of the data. The spline value at 0.05 is printed. * * * @see Code * @see Output * */ public class CsShapeEx1 { public static void main(String args[]) throws com.imsl.IMSLException { double x[] = {0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.80, 1.00}; double y[] = {0.00, 0.90, 0.95, 0.90, 0.10, 0.05, 0.05, 0.20, 1.00}; CsShape cs = new CsShape(x, y); double csv = cs.value(0.05); System.out.println("The computed cubic spline value at point .05 is " + csv); } }