#include <Integration.h>
Public Types | |
enum | Integrand { DataSet, AnalyticalFunction } |
Public Member Functions | |
double | area () |
Integration (const QString &formula, const QString &var, ApplicationWindow *parent, Graph *g, double start, double end) | |
Integration (ApplicationWindow *parent, Table *t, const QString &xCol, const QString &yCol, int start=0, int end=-1) | |
Integration (ApplicationWindow *parent, Graph *g, const QString &curveTitle, double start, double end) | |
Integration (ApplicationWindow *parent, Graph *g, const QString &curveTitle) | |
Integration (ApplicationWindow *parent, Graph *g) | |
int | method () |
void | setMethodOrder (int n) |
Private Member Functions | |
void | init () |
QString | logInfo () |
Output string added to the log pannel of the application. | |
void | output () |
Performs the data analysis and takes care of the output. | |
int | romberg () |
Returns the number of iterations used to calculate the area if d_integrand = AnalyticalFunction. | |
double | trapez () |
double | trapezf (int n) |
Private Attributes | |
double | d_area |
the value of the integral | |
QString | d_formula |
Analytical function to be integrated. | |
Integrand | d_integrand |
the type of the integrand | |
int | d_method |
the integration method: 1 = trapezoidal, max = 5! | |
QString | d_variable |
Variable name for the function to be integrated. |
Integration::Integration | ( | ApplicationWindow * | parent, | |
Graph * | g | |||
) |
References init().
Integration::Integration | ( | ApplicationWindow * | parent, | |
Graph * | g, | |||
const QString & | curveTitle | |||
) |
References init(), and Filter::setDataFromCurve().
Integration::Integration | ( | ApplicationWindow * | parent, | |
Graph * | g, | |||
const QString & | curveTitle, | |||
double | start, | |||
double | end | |||
) |
References init(), and Filter::setDataFromCurve().
Integration::Integration | ( | ApplicationWindow * | parent, | |
Table * | t, | |||
const QString & | xCol, | |||
const QString & | yCol, | |||
int | start = 0 , |
|||
int | end = -1 | |||
) |
References init(), and Filter::setDataFromTable().
Integration::Integration | ( | const QString & | formula, | |
const QString & | var, | |||
ApplicationWindow * | parent, | |||
Graph * | g, | |||
double | start, | |||
double | end | |||
) |
double Integration::area | ( | ) | [inline] |
void Integration::init | ( | ) | [private] |
Reimplemented from Filter.
References d_integrand, Filter::d_max_iterations, d_method, Filter::d_sort_data, and DataSet.
Referenced by Integration().
QString Integration::logInfo | ( | ) | [private, virtual] |
Output string added to the log pannel of the application.
Reimplemented from Filter.
References AnalyticalFunction, d_area, Filter::d_curve, ApplicationWindow::d_decimal_digits, d_formula, Filter::d_from, Filter::d_graph, d_integrand, d_method, Filter::d_n, Filter::d_to, Filter::d_tolerance, d_variable, Filter::d_x, Filter::d_y, Filter::d_y_col_name, DataSet, Graph::multiLayer(), romberg(), and trapez().
int Integration::method | ( | ) | [inline] |
References d_method.
void Integration::output | ( | ) | [private, virtual] |
Performs the data analysis and takes care of the output.
Reimplemented from Filter.
References Graph::addFunction(), AnalyticalFunction, d_formula, Filter::d_from, Filter::d_init_err, d_integrand, Filter::d_output_graph, Filter::d_points, Filter::d_to, d_variable, and FunctionCurve::Normal.
int Integration::romberg | ( | ) | [private] |
Returns the number of iterations used to calculate the area if d_integrand = AnalyticalFunction.
References d_area, Filter::d_max_iterations, d_method, Filter::d_tolerance, polint(), and trapezf().
Referenced by logInfo().
void Integration::setMethodOrder | ( | int | n | ) |
double Integration::trapez | ( | ) | [private] |
References Filter::addResultCurve(), Filter::d_n, Filter::d_output_graph, Filter::d_points, Filter::d_x, and Filter::d_y.
Referenced by logInfo().
double Integration::trapezf | ( | int | n | ) | [private] |
References d_formula, Filter::d_from, Filter::d_to, d_variable, and Filter::x().
Referenced by romberg().
double Integration::d_area [private] |
QString Integration::d_formula [private] |
Analytical function to be integrated.
Referenced by Integration(), logInfo(), output(), and trapezf().
Integrand Integration::d_integrand [private] |
int Integration::d_method [private] |
the integration method: 1 = trapezoidal, max = 5!
Referenced by init(), Integration(), logInfo(), method(), romberg(), and setMethodOrder().
QString Integration::d_variable [private] |
Variable name for the function to be integrated.
Referenced by Integration(), logInfo(), output(), and trapezf().