University of Rochester / Ultrasound Research Laboratory
2D Array Library

 
Class hierarchy   Compound list   File list   Header files   Compound Members   File Members   Examples  

spline.cpp File Reference

Routines for implementing cubic-spline data interpolation. More...

Functions


Detailed Description

Routines for implementing cubic-spline data interpolation.

Spline and Splint routines from Numerical recipes. See Chapter 3 Section 3 for a discussion of how it works Both of these routines assume array indices range from 1:n rather than the C convention of 0:n-1, so pointers to arrays need to be offset by -1

Interpolate is the general interface to the NR Spline and splint routines.

Equi_spline routine by Makoto Tabei for interpolating equally spaced data.

$Id: spline.cpp,v 1.1 1999-03-05 16:31:35-05 ljb Exp ljb $ $Revision: 1.1 $

$Log: spline.cpp,v $ Revision 1.1 1999-03-05 16:31:35-05 ljb Initial revision


Function Documentation

void equi_spline( float *y, float *y1, float *y2, int n )

This subroutine prepares two arrays "y1[]" and "y2[]" that are used in "equi_splint" function. "y[n]" should hold original data.

Parameters:
y - points to input data
y1 - points to a temporary array
y2 - points to a temporary array
n - is the length of all three arrays

Examples:
Txaper.cpp.

WORD interpolate( float* xin, float* yin, int nin, float* xout, float* yout, int nout)

Function used for general interpolation jobs.

Parameters:
xin - points to X-values of known data.
yin - points to Y-values of known data.
nin - is length of previous two arrays.
xout - points to X-values of desired data.
yout - points to buffer which is to be filled with desired Y-values.
nout - is length of previous two arrays.

Software written by
Larry Busse of LJB Development
and Bill Glenn, Al Murphy and John Losche of TETRAD Corporation
Documentation generated 3/11/1999