MPSolve 3.2.1
Loading...
Searching...
No Matches
mpsolveworker.h
1#ifndef MPSOLVEWORKER_H
2#define MPSOLVEWORKER_H
3
4#include <QThread>
5#include <mps/mps.h>
6
7namespace xmpsolve {
8
9class MPSolveWorker : public QThread
10{
11 Q_OBJECT
12public:
13 explicit MPSolveWorker(mps_context * s = NULL, QObject *parent = 0);
14
20 void setMpsContext(mps_context * ctx);
21
25 void run();
26
32 unsigned long int CPUTime();
33
37 void abortComputation();
38
42 clock_t* m_timer;
43
47 unsigned long int m_time;
48
49private:
50 mps_context * m_context;
51
52signals:
53
54public slots:
55
56};
57
58} // Namespace xmpsolve
59
60#endif // MPSOLVEWORKER_H
Definition: mpsolveworker.h:10
clock_t * m_timer
The timer used to check how long MPSolve needs to solve a polynomial.
Definition: mpsolveworker.h:42
void setMpsContext(mps_context *ctx)
setMpsContext can be used to set the current mps_context for the computation.
Definition: mpsolveworker.cpp:37
unsigned long int m_time
The time measured with the timer.
Definition: mpsolveworker.h:47
void abortComputation()
Abort the current computation.
Definition: mpsolveworker.cpp:25
unsigned long int CPUTime()
CPUTime gets the number of ms of CPU time used by the last call to run().
Definition: mpsolveworker.cpp:31
void run()
run Actually start the computation calling mps_mpsolve();
Definition: mpsolveworker.cpp:17
Header file for libmps.
this struct holds the state of the mps computation
Definition: context.h:55