BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtPolInt.hh
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2//
3// Environment:
4// This software is part of models developed at BES collaboration
5// based on the EvtGen framework. If you use all or part
6// of it, please give an appropriate acknowledgement.
7//
8// Copyright Information: See EvtGen/BesCopyright
9// Copyright (A) 2006 Ping Rong-Gang, Pang Cai-Ying@IHEP
10//
11// Module: EvtEvtPloInt.hh
12//
13// Description: Routine to deal with polynomial interpolation
14//
15// Modification history:
16//
17// Ping R.-G. December, 2010 Module created
18//
19//------------------------------------------------------------------------
20#ifndef EVTPOLINT_HH
21#define EVTPOLINT_HH
22
23
24#include <cmath>
25#include <string>
26#include <iostream>
27#include <vector>
28using std::endl;
29using std::vector;
30
32public:
33 EvtPolInt(vector<double> xi, vector<double> yi, double x){
34 xx = x;
35 size = xi.size();
36 vx.clear();
37 vy.clear();
38 for(int i=0;i<size;i++){
39 vx.push_back(xi[i]);
40 vy.push_back(yi[i]);
41 }
42 }
43 virtual ~EvtPolInt(){}
44
45 void polynomial(); //polynomial interpolation see: Numerical recipes in C++ page 82
46 void ratint();
47 vector <double> spline();
48 void splint();
49 double getvalue();
50 double geterror();
51
52private:
53 vector <double> vx, vy;
54 double xx,value,error;
55 int size;
56
57};
58
59
60
61#endif
double getvalue()
Definition: EvtPolInt.cc:165
double geterror()
Definition: EvtPolInt.cc:172
vector< double > spline()
Definition: EvtPolInt.cc:102
void ratint()
Definition: EvtPolInt.cc:59
virtual ~EvtPolInt()
Definition: EvtPolInt.hh:43
EvtPolInt(vector< double > xi, vector< double > yi, double x)
Definition: EvtPolInt.hh:33
void splint()
Definition: EvtPolInt.cc:141
void polynomial()
Definition: EvtPolInt.cc:23
double x[1000]