Bridge++
Ver. 1.1.x
Main Page
Namespaces
Classes
Files
File List
File Members
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
:
44
Parameters_Math_Rational
();
45
};
46
//- end
47
48
class
Math_Rational
49
{
50
protected
:
51
Bridge::VerboseLevel
m_vl
;
52
53
private
:
54
int
m_Np
,
m_n_exp
,
m_d_exp
;
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
:
61
Math_Rational
()
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
71
void
set_parameter_verboselevel
(
const
Bridge::VerboseLevel
vl
) {
m_vl
=
vl
; }
72
73
double
func
(
double
x);
74
75
private
:
76
void
set_coeff
();
77
void
read_file
();
78
};
79
#endif
src
Tools
math_Rational.h
Generated on Tue Jul 23 2013 10:48:50 for Bridge++ by
1.8.3.1