-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIntegralThreads.h
68 lines (52 loc) · 1.2 KB
/
IntegralThreads.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef INTEGRAL_THREADS_H
#define INTEGRAL_THREADS_H
#include "XCore.h"
#define ModeIntLeftRect 0
#define ModeIntRightRect 1
#define ModeIntMedianRect 2
#define ModeIntTrapeze 3
#define ModeIntSimpson 4
typedef int ModeInt;
class IntConstStepThread : public BaseCalcThread
{
Q_OBJECT
QString func;
double a;
double b;
int n;
ModeInt mode;
public:
IntConstStepThread(QString func, double a, double b, int n, ModeInt mode);
void run();
};
class IntFloatingStepThread : public BaseCalcThread
{
Q_OBJECT
QString func;
double a;
double b;
double e;
ModeInt mode;
public:
void sendResult(double value, int iterations);
signals:
void sendResultSignal(double /*value*/, int /*iterations*/);
public:
IntFloatingStepThread(QString func, double a, double b, double e, ModeInt mode);
void run();
};
class IntMultipleThread : public BaseCalcThread
{
Q_OBJECT
QString func;
double a;
double b;
double c;
double d;
int xn;
int yn;
public:
IntMultipleThread(QString func, double a, double b, double c, double d, int xn, int yn);
void run();
};
#endif // INTEGRAL_THREADS_H