Bridge++  Ver. 1.2.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  public:
51  static const std::string class_name;
52 
53  protected:
55 
56  private:
58  double m_x_min, m_x_max;
59  double m_norm, m_error;
60  std::valarray<double> m_res;
61  std::valarray<double> m_pole;
62 
63  public:
65  : m_vl(CommonParameters::Vlevel()) {}
66 
67  void set_parameters(const Parameters& params);
68  void set_parameters(const int Np, const int n_exp, const int d_exp,
69  const double x_min, const double x_max);
70 
71  void get_parameters(double& norm, std::valarray<double>& res,
72  std::valarray<double>& pole);
73 
75 
76  double func(double x);
77 
78  private:
79  void set_coeff();
80  void read_file();
81 };
82 #endif
Determionation of coefficients of rational approximation.
Definition: math_Rational.h:41
BridgeIO vout
Definition: bridgeIO.cpp:207
static const std::string class_name
Definition: math_Rational.h:51
void set_parameters(const Parameters &params)
void get_parameters(double &norm, std::valarray< double > &res, std::valarray< double > &pole)
std::valarray< double > m_res
Definition: math_Rational.h:60
Class for parameters.
Definition: parameters.h:40
double func(double x)
Common parameter class: provides parameters as singleton.
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: math_Rational.h:74
Bridge::VerboseLevel m_vl
Definition: math_Rational.h:54
Bridge::VerboseLevel vl
Definition: checker.cpp:18
VerboseLevel
Definition: bridgeIO.h:25
std::valarray< double > m_pole
Definition: math_Rational.h:61