Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef FUNCTIONS_H
- #define FUNCTIONS_H
- #define PI 3.14
- #define INFINITE 1.5;
- #include <math.h>
- #include <functioncalculater.h>
- #include <QtCore/QString>
- #include <QtCore/QDebug>
- using namespace std;
- namespace functions2
- {
- double T=INFINITE;
- double w=(2*PI)/T;
- double function0(double x)
- {
- return (x==-1.0)?(0):(1);
- }
- }
- namespace basicfunction
- {
- double x=0;
- double T;
- double w;
- double (*function0)(double);
- double calculateFImage( double _x )
- {
- std::complex<double> cnumber(0, -1);
- cnumber/=_x;
- return std::abs(cnumber);
- }
- complex<double> subintegratedReverseImage(complex<double> _z)
- {
- double z = real(_z);
- return complex<double>(0, -1.0/z) * exp( complex<double>(0, 1.0*(x)* z) );
- }
- comp calculateFReverseImage(double _x)
- {
- x = _x;
- comp from = comp(0, 0);
- comp to = comp(3*w, 0);
- comp cr = ( FunctionCalculater::cintegrate ( subintegratedReverseImage,
- from,
- to) );
- cr /= 1/2*PI;
- return cr;
- }
- };
- #endif // FUNCTIONS_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement