/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/BesEvtGen/BesEvtGen-00-03-58/src/EvtGen/EvtGenBase/EvtPolInt.hh

Go to the documentation of this file.
00001 //--------------------------------------------------------------------------
00002 //
00003 // Environment:
00004 //      This software is part of models developed at BES collaboration
00005 //      based on the EvtGen framework.  If you use all or part
00006 //      of it, please give an appropriate acknowledgement.
00007 //
00008 // Copyright Information: See EvtGen/BesCopyright
00009 //      Copyright (A) 2006      Ping Rong-Gang, Pang Cai-Ying@IHEP
00010 //
00011 // Module: EvtEvtPloInt.hh
00012 //
00013 // Description: Routine to deal with polynomial interpolation 
00014 //
00015 // Modification history:
00016 //
00017 //    Ping R.-G.    December, 2010   Module created
00018 //
00019 //------------------------------------------------------------------------
00020 #ifndef EVTPOLINT_HH
00021 #define EVTPOLINT_HH
00022 
00023 
00024 #include <cmath>
00025 #include <string>
00026 #include <iostream>
00027 #include <vector>
00028 using std::endl;
00029 using std::vector;
00030 
00031 class EvtPolInt{
00032 public:
00033   EvtPolInt(vector<double> xi, vector<double> yi, double x){
00034     xx = x;
00035     size = xi.size();
00036     vx.clear();
00037     vy.clear();
00038     for(int i=0;i<size;i++){
00039       vx.push_back(xi[i]);
00040       vy.push_back(yi[i]);
00041     }
00042   } 
00043   virtual ~EvtPolInt(){}
00044 
00045   void polynomial(); //polynomial interpolation see: Numerical recipes in C++ page 82
00046   void ratint();
00047   vector <double> spline();
00048   void splint();
00049   double getvalue();
00050   double geterror();
00051 
00052 private:
00053   vector <double> vx, vy;
00054   double xx,value,error;
00055   int size;
00056 
00057 };
00058 
00059 
00060 
00061 #endif

Generated on Tue Nov 29 23:12:14 2016 for BOSS_7.0.2 by  doxygen 1.4.7