8.0.0.5. Function Interpolation |
(packages/libnum/interpolator.lsh) |

This defines a class for approximating scalar functions by interpolating between a number of control points. This provides a variety of interpolation methods, including, linear, polynomial, cubinc spline, and Akima splines. Methods are available for computing integrals and first and second derivatives. The class implementation uses GSL's interpolation functions. Example of use:

;; create cubic spline interpolator (defparameter z (new interpolator 2 [0 1 2 3 4] [0 5 2 8 1])) = ::interpolator:82b15b8 ? (==> z eval 0.5) = 3.6317 ? (==> z eval 1) = 5 ? (==> z derivative 1) = -1.0357 = 8.0179 ? (==> z derivative2 1) = -18.1071 ? (==> z integral 0 1) = 3.2545 ? (delete z)

8.0.0.5.0. interpolator |
(packages/libnum/interpolator.lsh) |

The interpolator class.

8.0.0.5.1. (new interpolator type xarray yarray) |
[CLASS] (packages/libnum/interpolator.lsh) |

Create a new interpolator object. Argument

8.0.0.5.2. (==> interpolator eval x) |
[MSG] (packages/libnum/interpolator.lsh) |

evaluate interpolated function at abscissa

8.0.0.5.3. (==> interpolator derivative x) |
[MSG] (packages/libnum/interpolator.lsh) |

evaluate first derivative of interpolated function at abscissa

8.0.0.5.4. (==> interpolator derivative2 x) |
[MSG] (packages/libnum/interpolator.lsh) |

evaluate 2nd derivative of interpolated function at abscissa

8.0.0.5.5. (==> interpolator integral a b) |
[MSG] (packages/libnum/interpolator.lsh) |

evaluate integral of interpolated function between abscissas