Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
math_Rational.h
Go to the documentation of this file.
1 
14 #ifndef MATH_RATIONAL_INCLUDED
15 #define MATH_RATIONAL_INCLUDED
16 
17 #include <fstream>
18 #include <cmath>
19 #include <cassert>
20 
21 #include "parameters.h"
22 #include "commonParameters.h"
23 
24 #include "bridgeIO.h"
25 using Bridge::vout;
26 
28 
40 //- parameters class
41 class Parameters_Math_Rational : virtual public Parameters
42 {
43  public:
45 };
46 //- end
47 
49 {
50  protected:
52 
53  private:
55  double m_x_min, m_x_max;
56  double m_norm, m_error;
57  std::valarray<double> m_res;
58  std::valarray<double> m_pole;
59 
60  public:
62  : m_vl(CommonParameters::Vlevel()) {}
63 
64  void set_parameters(const Parameters& params);
65  void set_parameters(const int Np, const int n_exp, const int d_exp,
66  const double x_min, const double x_max);
67 
68  void get_parameters(double& norm, std::valarray<double>& res,
69  std::valarray<double>& pole);
70 
72 
73  double func(double x);
74 
75  private:
76  void set_coeff();
77  void read_file();
78 };
79 #endif