X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Finterpolator.h;fp=include%2Finterpolator.h;h=def913ec377161f40e86e7765fb24f1faf605cbe;hp=0000000000000000000000000000000000000000;hb=befd71a7157339b52a0c40359518d5276b25d127;hpb=d3fa225aa232e132cc198672c4fc148f96a1ab8c diff --git a/include/interpolator.h b/include/interpolator.h new file mode 100644 index 0000000..def913e --- /dev/null +++ b/include/interpolator.h @@ -0,0 +1,49 @@ +/***************************************************************************** +** This is part of the CTSim program +** Copyright (c) 1983-2001 Kevin Rosenberg +** +** $Id: interpolator.h,v 1.1 2001/02/11 21:57:08 kevin Exp $ +** +** This program is free software; you can redistribute it and/or modify +** it under the terms of the GNU General Public License (version 2) as +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; if not, write to the Free Software +** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +******************************************************************************/ + + +class CubicSplineInterpolator { +private: + double *m_pdY2; // second differential of y data + + const double* const m_pdY; + const int m_n; + +public: + CubicSplineInterpolator (const double* const y, int n); + + ~CubicSplineInterpolator (); + + double interpolate (double x); +}; + +class CubicPolyInterpolator { +private: + const double* const m_pdY; + const int m_n; + +public: + CubicPolyInterpolator (const double* const y, int n); + + ~CubicPolyInterpolator (); + + double interpolate (double x); +}; +