Bridge++  Ver. 2.0.2
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/parameters.h"
23 
24 #include "IO/bridgeIO.h"
25 using Bridge::vout;
26 
28 
41 {
42  public:
43  static const std::string class_name;
44 
45  protected:
47 
48  private:
50  double m_x_min, m_x_max;
51  double m_norm, m_error;
52  std::vector<double> m_res;
53  std::vector<double> m_pole;
54 
55  public:
57  : m_vl(CommonParameters::Vlevel()) {}
58 
59  Math_Rational(const Parameters& params)
60  : m_vl(CommonParameters::Vlevel())
61  {
62  set_parameters(params);
63  }
64 
65  void set_parameters(const Parameters& params);
66  void set_parameters(const int Np, const int n_exp, const int d_exp,
67  const double x_min, const double x_max);
68 
69  void get_parameters(double& norm, std::vector<double>& res,
70  std::vector<double>& pole);
71 
73 
74  void get_parameters(Parameters& params) const;
75 
76  double func(const double x);
77 
78  private:
79  void set_coeff();
80  void read_file();
81 };
82 #endif
bridgeIO.h
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
Parameters
Class for parameters.
Definition: parameters.h:46
Math_Rational::m_x_min
double m_x_min
Definition: math_Rational.h:50
Math_Rational::get_parameters
void get_parameters(double &norm, std::vector< double > &res, std::vector< double > &pole)
Definition: math_Rational.cpp:100
Math_Rational::Math_Rational
Math_Rational()
Definition: math_Rational.h:56
Math_Rational::set_parameter_verboselevel
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
Definition: math_Rational.h:72
Math_Rational::set_parameters
void set_parameters(const Parameters &params)
Definition: math_Rational.cpp:20
Math_Rational::read_file
void read_file()
Definition: math_Rational.cpp:129
Math_Rational::func
double func(const double x)
Definition: math_Rational.cpp:193
ParameterCheck::vl
Bridge::VerboseLevel vl
Definition: parameterCheck.cpp:18
Math_Rational::set_coeff
void set_coeff()
Definition: math_Rational.cpp:122
parameters.h
Math_Rational::m_vl
Bridge::VerboseLevel m_vl
Definition: math_Rational.h:46
Math_Rational::m_d_exp
int m_d_exp
Definition: math_Rational.h:49
Math_Rational::m_norm
double m_norm
Definition: math_Rational.h:51
Math_Rational::class_name
static const std::string class_name
Definition: math_Rational.h:43
commonParameters.h
Math_Rational::m_res
std::vector< double > m_res
Definition: math_Rational.h:52
Math_Rational::Math_Rational
Math_Rational(const Parameters &params)
Definition: math_Rational.h:59
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
Math_Rational::m_x_max
double m_x_max
Definition: math_Rational.h:50
Math_Rational::m_n_exp
int m_n_exp
Definition: math_Rational.h:49
Math_Rational
Determionation of coefficients of rational approximation.
Definition: math_Rational.h:40
Math_Rational::m_pole
std::vector< double > m_pole
Definition: math_Rational.h:53
Math_Rational::m_Np
int m_Np
Definition: math_Rational.h:49
Math_Rational::m_error
double m_error
Definition: math_Rational.h:51
Bridge::vout
BridgeIO vout
Definition: bridgeIO.cpp:512