#ifndef ESTINTFUNC_HH #define ESTINTFUNC_HH //////////////////////////////////////////////////////////////////////////// //! author="Kieron J Messer" //! date="21/5/100" //! lib=NumRBF //! docentry="default.Kieron J Messer" //! rcsid="$Id: EstIntFunc.hh,v 1.2 2000/10/02 10:32:53 ees2km Exp $" #include "amma/Array1d.hh" #include "amma/Tuple2.hh" #include "amma/Num/NumFunc.hh" ///// EstIntFuncC //////////////////////////////////////////////////////// //! userlevel=Normal //: Put a brief description of your class // Put a more detailed description of your class here. You use embedded html // to make it clearer in the html documentation #define ALPH 1.5 #define NDMX 50 #define MXDIM 10 #define TINYNUMBER (float)1.0e-30 typedef Tuple2C RangeT; typedef Array1dC WindowT; extern long idum; static int imaxarg1,imaxarg2; #define IMAX(a,b) (imaxarg1=(a),imaxarg2=(b),(imaxarg1) > (imaxarg2) ?\ (imaxarg1) : (imaxarg2)) static int iminarg1,iminarg2; #define IMIN(a,b) (iminarg1=(a),iminarg2=(b),(iminarg1) < (iminarg2) ?\ (iminarg1) : (iminarg2)) static float sqrarg; #define SQR(a) ((sqrarg=(a)) == 0.0 ? 0.0 : sqrarg*sqrarg) class EstIntFuncC { public: EstIntFuncC(const NumFuncC &func); //: Default constructor EstIntFuncC(istream &in); //: Stream constructor RealT Vegas(const WindowT &win, IntT ncall=500, IntT itmx=5) const; //: Compute the value of the function in the specified window range protected: //: Put all your class members here NumFuncC func; //: the function you wish to integrate void Rebin(float rc, int nd, float r[], float xin[], float xi[]) const; }; #endif