libkpl  5.0
A Library for Graphical Presentation of Data Sets and Functions
calcjob.h
1 //
2 // C++ Interface: calcjob
3 //
4 // Description:
5 //
6 //
7 // Author: Werner Stille <kpl@werner-stille.de>, (C) 2017
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12 #ifndef CALCJOB_H
13 #define CALCJOB_H
14 
15 #include <ThreadWeaver/ThreadWeaver>
16 
22 class CalcJob : public ThreadWeaver::Job
23 {
24 public:
33  CalcJob(const double* x, double* values,
34  double (*func)(double, const double*), const double* par, int n);
36  ~CalcJob();
37 
38 protected:
40  void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread*);
41  const double *m_t, *m_par;
42  double* m_values;
43  double (*m_func)(double, const double*);
44  int m_n;
45 };
46 
47 #endif
Calculation job class.
Definition: calcjob.h:22
~CalcJob()
Destructor.
CalcJob(const double *x, double *values, double(*func)(double, const double *), const double *par, int n)
Constructor.
void run(ThreadWeaver::JobPointer, ThreadWeaver::Thread *)
Calculates function values.