Integration.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef INTEGRATION_H
00030 #define INTEGRATION_H
00031
00032 #include "Filter.h"
00033
00034 class Integration : public Filter
00035 {
00036 Q_OBJECT
00037
00038 public:
00039 enum Integrand{DataSet, AnalyticalFunction};
00040
00041 Integration(ApplicationWindow *parent, Graph *g);
00042 Integration(ApplicationWindow *parent, Graph *g, const QString& curveTitle);
00043 Integration(ApplicationWindow *parent, Graph *g, const QString& curveTitle, double start, double end);
00044 Integration(ApplicationWindow *parent, Table *t, const QString& xCol, const QString& yCol, int start = 0, int end = -1);
00045 Integration(const QString& formula, const QString& var, ApplicationWindow *parent,
00046 Graph *g, double start, double end);
00047
00048 int method(){return d_method;};
00049 void setMethodOrder(int n);
00050
00051 double area(){return d_area;};
00052
00053 private:
00054 void init();
00055 QString logInfo();
00056
00057 void output();
00058
00059 double trapez();
00060 double trapezf(int n);
00062 int romberg();
00063
00065 int d_method;
00066
00068 double d_area;
00069
00071 Integrand d_integrand;
00073 QString d_formula;
00075 QString d_variable;
00076 };
00077
00078 #endif