r521: no message
[ctsim.git] / include / interpolator.h
diff --git a/include/interpolator.h b/include/interpolator.h
new file mode 100644 (file)
index 0000000..def913e
--- /dev/null
@@ -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);
+};
+