QtiPlot  0.9.8.2
Public Types | Public Member Functions | Private Member Functions | Private Attributes
Integration Class Reference

#include <Integration.h>

Inheritance diagram for Integration:
Filter

List of all members.

Public Types

enum  Integrand { DataSet, AnalyticalFunction }

Public Member Functions

double area ()
QString formula ()
 Integration (ApplicationWindow *parent, Graph *g=0)
 Integration (ApplicationWindow *parent, QwtPlotCurve *c)
 Integration (ApplicationWindow *parent, QwtPlotCurve *c, double start, double end)
 Integration (ApplicationWindow *parent, Graph *g, const QString &curveTitle)
 Integration (ApplicationWindow *parent, Graph *g, const QString &curveTitle, double start, double end)
 Integration (ApplicationWindow *parent, Table *t, const QString &xCol, const QString &yCol, int start=0, int end=-1, bool sort=false)
 Integration (const QString &formula, const QString &var, ApplicationWindow *parent, Graph *g, double start, double end)
void setWorkspaceSize (int size)
QString variable ()
- Public Member Functions inherited from Filter
int dataSize ()
 Returns the size of the input data set.
virtual void enableGraphicsDisplay (bool on=true, Graph *g=0)
bool error ()
 Filter (ApplicationWindow *parent, Table *t=0, const QString &name=QString())
 Filter (ApplicationWindow *parent, Graph *g=0, const QString &name=QString())
 Filter (ApplicationWindow *parent, Matrix *m, const QString &name=QString())
 Filter (ApplicationWindow *parent, QwtPlotCurve *c)
virtual QString legendInfo ()
 Output string added to the plot as a new legend.
GraphoutputGraph ()
 Returns a pointer to the graph where the result curve should be displayed.
TableresultTable ()
 Returns a pointer to the table created to display the results.
virtual bool run ()
 Actually does the job. Should be reimplemented in derived classes.
void setColor (int colorId)
 Obsolete: sets the color of the output fit curve.
void setColor (const QColor &color)
 Sets the color of the output fit curve.
void setColor (const QString &colorName)
 Sets the color of the output fit curve. Provided for convenience. To be used in scripts only!
virtual void setDataCurve (QwtPlotCurve *curve, double start, double end)
bool setDataFromCurve (QwtPlotCurve *c)
bool setDataFromCurve (QwtPlotCurve *c, double from, double to)
bool setDataFromCurve (const QString &curveTitle, Graph *g=0)
bool setDataFromCurve (const QString &curveTitle, double from, double to, Graph *g=0)
virtual bool setDataFromTable (Table *, const QString &, const QString &, int=1, int=-1, bool=false)
void setError (bool on=true)
void setInterval (double from, double to)
 Changes the data range if the source curve was already assigned. Provided for convenience.
void setMaximumIterations (int iter)
 Sets the maximum number of iterations to be performed during an iterative session.
void setOutputPoints (int points)
 Sets the number of points in the output curve.
void setOutputPrecision (int digits)
 Sets the precision used for the output.
void setSortData (bool on=true)
void setTolerance (double eps)
 Sets the tolerance used by the GSL routines.
void setUpdateOutputGraph (bool update=true)
virtual void showLegend ()
 Adds a new legend to the plot. Calls virtual legendInfo()
double * x ()
 Returns the x values of the input data set.
double * y ()
 Returns the y values of the input data set.
 ~Filter ()

Private Member Functions

double gslIntegration ()
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.
double trapez ()

Private Attributes

double d_area
 the value of the integral
double d_error
 the value of the estimated error in GSL integration
QString d_formula
 Analytical function to be integrated.
Integrand d_integrand
 the type of the integrand
QString d_variable
 Variable name for the function to be integrated.
int d_workspace_size
 the value of the workspace size in GSL integration

Additional Inherited Members

- Protected Member Functions inherited from Filter
QwtPlotCurve * addResultCurve (double *x, double *y)
 Adds the result curve to the target output plot window. Creates a hidden table and frees the input data from memory.
virtual void calculateOutputData (double *X, double *Y)
 Calculates the data for the output curve and store it in the X an Y vectors.
MultiLayercreateOutputGraph ()
virtual int curveData (QwtPlotCurve *c, double start, double end, double **x, double **y)
int curveIndex (const QString &curveTitle, Graph *g)
 Performs checks and returns the index of the source data curve if OK, -1 otherwise.
int curveRange (QwtPlotCurve *c, double start, double end, int *iStart, int *iEnd)
virtual void freeMemory ()
 Frees the memory allocated for the X and Y data sets.
void memoryErrorMessage ()
virtual int sortedCurveData (QwtPlotCurve *c, double start, double end, double **x, double **y)
 Same as curveData, but sorts the points by their x value.
- Protected Attributes inherited from Filter
QwtPlotCurve * d_curve
 The curve to be analysed.
QColor d_curveColor
 Color index of the result curve.
QString d_explanation
 String explaining the operation in the comment of the result table and in the project explorer.
double d_from
 Data interval.
Graphd_graph
 The source graph with the curve to be analyzed.
bool d_graphics_display
 Specifies if the filter should display a result curve.
bool d_init_err
 Error flag telling if something went wrong during the initialization phase.
Matrixd_matrix
int d_max_iterations
 Maximum number of iterations per fit.
int d_min_points
 Minimum number of data points necessary to perform the operation.
int d_n
 Size of the data arrays.
Graphd_output_graph
 The graph where the result curve should be displayed.
int d_points
 Number of result points to de calculated and displayed in the output curve.
int d_prec
 Precision (number of significant digits) used for the results output.
Tabled_result_table
 The table displaying the results of the filtering operation (not alvays valid!)
bool d_sort_data
 Specifies if the filter needs sorted data as input.
Tabled_table
 A table source of data.
double d_to
double d_tolerance
 GSL Tolerance, if ever needed...
bool d_update_output_graph
 Specifies if the filter should update the output graph.
double * d_x
 x data set to be analysed
double * d_y
 y data set to be analysed
QString d_y_col_name

Member Enumeration Documentation

Enumerator:
DataSet 
AnalyticalFunction 

Constructor & Destructor Documentation

Integration::Integration ( ApplicationWindow parent,
Graph g = 0 
)

References init().

Integration::Integration ( ApplicationWindow parent,
QwtPlotCurve *  c 
)
Integration::Integration ( ApplicationWindow parent,
QwtPlotCurve *  c,
double  start,
double  end 
)
Integration::Integration ( ApplicationWindow parent,
Graph g,
const QString &  curveTitle 
)
Integration::Integration ( ApplicationWindow parent,
Graph g,
const QString &  curveTitle,
double  start,
double  end 
)
Integration::Integration ( ApplicationWindow parent,
Table t,
const QString &  xCol,
const QString &  yCol,
int  start = 0,
int  end = -1,
bool  sort = false 
)
Integration::Integration ( const QString &  formula,
const QString &  var,
ApplicationWindow parent,
Graph g,
double  start,
double  end 
)

Member Function Documentation

double Integration::area ( )
inline

References d_area.

Referenced by IntegrationDialog::integrateTable().

QString Integration::formula ( )
inline

References d_formula.

double Integration::gslIntegration ( )
private
void Integration::init ( )
private

Reimplemented from Filter.

References d_integrand, Filter::d_sort_data, and DataSet.

Referenced by Integration().

QString Integration::logInfo ( )
privatevirtual
void Integration::output ( )
privatevirtual
void Integration::setWorkspaceSize ( int  size)
inline

References d_workspace_size.

Referenced by IntDialog::accept().

double Integration::trapez ( )
private
QString Integration::variable ( )
inline

References d_variable.


Member Data Documentation

double Integration::d_area
private

the value of the integral

Referenced by area(), gslIntegration(), and logInfo().

double Integration::d_error
private

the value of the estimated error in GSL integration

Referenced by gslIntegration(), and logInfo().

QString Integration::d_formula
private

Analytical function to be integrated.

Referenced by formula(), logInfo(), and output().

Integrand Integration::d_integrand
private

the type of the integrand

Referenced by init(), Integration(), logInfo(), and output().

QString Integration::d_variable
private

Variable name for the function to be integrated.

Referenced by logInfo(), output(), and variable().

int Integration::d_workspace_size
private

the value of the workspace size in GSL integration

Referenced by gslIntegration(), Integration(), and setWorkspaceSize().


The documentation for this class was generated from the following files: