Go to the documentation of this file.
32 err += params.
fetch_int(
"number_of_poles", Np);
33 err += params.
fetch_int(
"exponent_numerator", n_exp);
34 err += params.
fetch_int(
"exponent_denominator", d_exp);
62 const double x_min,
const double x_max)
101 std::vector<double>& pole)
103 if (res.size() !=
m_Np) {
108 if (pole.size() !=
m_Np) {
114 for (
int i = 0; i <
m_Np; ++i) {
134 char filename[FILENAME_MAX];
136 snprintf(filename, FILENAME_MAX,
137 "parameter_rational.%1d_%1d%s_%02d_%010.8f_%07.3f",
145 int Np, n_exp, d_exp;
149 std::fstream parameter_file;
150 parameter_file.open(filename, std::ios::in);
151 if (!parameter_file.is_open()) {
152 vout.
crucial(
m_vl,
"Error at %s: failed to open parameter file. %s(%d)\n",
157 parameter_file >> Np >> n_exp >> d_exp;
158 parameter_file >> x_min >> x_max;
161 for (
int i = 0; i < Np; i++) {
164 parameter_file.close();
187 assert(fabs((
m_x_min - x_min) / x_min) < sqrt_eps);
188 assert(fabs((
m_x_max - x_max) / x_max) < sqrt_eps);
197 for (
int k = 0; k <
m_Np; ++k) {
void set_string(const string &key, const string &value)
void set_double(const string &key, const double value)
void get_parameters(double &norm, std::vector< double > &res, std::vector< double > &pole)
void set_parameters(const Parameters ¶ms)
double func(const double x)
Bridge::VerboseLevel m_vl
static VerboseLevel set_verbose_level(const std::string &str)
int non_zero(const double v)
void set_int(const string &key, const int value)
int fetch_string(const string &key, string &value) const
int fetch_double(const string &key, double &value) const
static const std::string class_name
void crucial(const char *format,...)
std::vector< double > m_res
std::vector< double > m_pole
int fetch_int(const string &key, int &value) const
void general(const char *format,...)
static std::string get_verbose_level(const VerboseLevel vl)
static double epsilon_criterion()