00001 /* This file is part of Cloudy and is copyright (C)1978-2010 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 00004 #ifndef MONOINTERP_H_ 00005 #define MONOINTERP_H_ 00006 00007 // Usage: 00008 // Monointerp m(xvals,yvals, npt); -- Constructor 00009 // y_interp = m(x_interp); -- Interpolate value 00010 00011 class Monointerp { 00012 const std::vector<double> m_x, m_y; 00013 std::vector<double> m_g; 00014 00015 public: 00016 // CONSTRUCTORS 00017 Monointerp ( const double x[], const double y[], long n); 00018 ~Monointerp(void); 00019 private: 00020 Monointerp ( const Monointerp& ); // Not implemented 00021 Monointerp& operator= ( const Monointerp& ); // Not implemented 00022 00023 // MANIPULATORS -- None 00024 00025 // ACCESSORS 00026 public: 00027 double operator() ( double xval) const; 00028 00029 }; 00030 #endif