|
QtiPlot
0.9.8.2
|
#include <NonLinearFit.h>
Public Member Functions | |
| QMap< QString, double > | constants () |
| int | constantsCount () |
| QList< QString > | constantsList () |
| double | constValue (const QString &name) |
| double | eval (double *par, double x) |
| Calculates the data for the output fit curve. | |
| virtual QString | legendInfo () |
| Output string added to the plot as a new legend. | |
| NonLinearFit (ApplicationWindow *parent, Graph *g) | |
| NonLinearFit (ApplicationWindow *parent, QwtPlotCurve *c) | |
| NonLinearFit (ApplicationWindow *parent, QwtPlotCurve *c, double start, double end) | |
| NonLinearFit (ApplicationWindow *parent, Graph *g, const QString &curveTitle) | |
| NonLinearFit (ApplicationWindow *parent, Graph *g, const QString &curveTitle, double start, double end) | |
| NonLinearFit (ApplicationWindow *parent, Table *t, const QString &xCol, const QString &yCol, int startRow=1, int endRow=-1) | |
| void | removeConstant (const QString &parName) |
| void | removeConstants () |
| void | setConstant (const QString &parName, double val) |
| virtual bool | setFormula (const QString &s, bool=true) |
| virtual bool | setParametersList (const QStringList &lst) |
Static Public Member Functions | |
| static QStringList | guessParameters (const QString &s, bool *error=0, string *errMsg=0, const QString &var="x") |
Protected Member Functions | |
| FunctionCurve * | insertFitFunctionCurve (const QString &name, int penWidth=1, bool updateData=true) |
| Adds the result curve as a FunctionCurve to the plot, if d_gen_function = true. | |
| QString | logFitInfo (int iterations, int status) |
| Output string added to the result log. | |
Private Member Functions | |
| void | calculateFitCurveData (double *X, double *Y) |
| Calculates the data for the output fit curve and store itin the X an Y vectors. | |
| void | init () |
| virtual bool | removeDataSingularities () |
| Removes any data singularities before fitting. | |
| void | removePole (int index) |
Private Attributes | |
| QMap< QString, double > | d_constants |
| NonLinearFit::NonLinearFit | ( | ApplicationWindow * | parent, |
| Graph * | g | ||
| ) |
References init().
| NonLinearFit::NonLinearFit | ( | ApplicationWindow * | parent, |
| QwtPlotCurve * | c | ||
| ) |
References init(), and Filter::setDataFromCurve().
| NonLinearFit::NonLinearFit | ( | ApplicationWindow * | parent, |
| QwtPlotCurve * | c, | ||
| double | start, | ||
| double | end | ||
| ) |
References init(), and Filter::setDataFromCurve().
| NonLinearFit::NonLinearFit | ( | ApplicationWindow * | parent, |
| Graph * | g, | ||
| const QString & | curveTitle | ||
| ) |
References init(), and Filter::setDataFromCurve().
| NonLinearFit::NonLinearFit | ( | ApplicationWindow * | parent, |
| Graph * | g, | ||
| const QString & | curveTitle, | ||
| double | start, | ||
| double | end | ||
| ) |
References init(), and Filter::setDataFromCurve().
| NonLinearFit::NonLinearFit | ( | ApplicationWindow * | parent, |
| Table * | t, | ||
| const QString & | xCol, | ||
| const QString & | yCol, | ||
| int | startRow = 1, |
||
| int | endRow = -1 |
||
| ) |
References init(), and Fit::setDataFromTable().
| void NonLinearFit::calculateFitCurveData | ( | double * | X, |
| double * | Y | ||
| ) | [private, virtual] |
Calculates the data for the output fit curve and store itin the X an Y vectors.
Reimplemented from Fit.
References d_constants, Fit::d_formula, Fit::d_gen_function, Filter::d_n, Fit::d_p, Fit::d_param_names, Filter::d_points, Fit::d_results, Filter::d_x, MyParser::EvalRemoveSingularity(), and Filter::x().
| QMap<QString, double> NonLinearFit::constants | ( | ) | [inline] |
| int NonLinearFit::constantsCount | ( | ) | [inline] |
| QList<QString> NonLinearFit::constantsList | ( | ) | [inline] |
| double NonLinearFit::constValue | ( | const QString & | name | ) | [inline] |
| double NonLinearFit::eval | ( | double * | , |
| double | |||
| ) | [virtual] |
Calculates the data for the output fit curve.
Reimplemented from Fit.
References d_constants, Fit::d_formula, Fit::d_p, Fit::d_param_names, and MyParser::EvalRemoveSingularity().
| QStringList NonLinearFit::guessParameters | ( | const QString & | s, |
| bool * | error = 0, |
||
| string * | errMsg = 0, |
||
| const QString & | var = "x" |
||
| ) | [static] |
References Fit::formula().
Referenced by FunctionDialog::guessConstants(), FitDialog::guessParameters(), and setFormula().
| void NonLinearFit::init | ( | ) | [private] |
Reimplemented from Fit.
References Fit::d_df, Filter::d_explanation, Fit::d_f, Fit::d_fdf, Fit::d_fit_type, Fit::d_formula, Fit::d_fsimplex, Fit::User, user_d(), user_df(), user_f(), and user_fdf().
Referenced by NonLinearFit().
| FunctionCurve * NonLinearFit::insertFitFunctionCurve | ( | const QString & | name, |
| int | penWidth = 1, |
||
| bool | updateData = true |
||
| ) | [protected, virtual] |
Adds the result curve as a FunctionCurve to the plot, if d_gen_function = true.
Reimplemented from Fit.
References d_constants, Filter::d_points, FunctionCurve::loadData(), and FunctionCurve::setConstant().
| QString NonLinearFit::legendInfo | ( | ) | [virtual] |
Output string added to the plot as a new legend.
Reimplemented from Fit.
References d_constants, and Filter::d_prec.
| QString NonLinearFit::logFitInfo | ( | int | iterations, |
| int | status | ||
| ) | [protected, virtual] |
Output string added to the result log.
Reimplemented from Fit.
References d_constants, and Filter::d_prec.
| void NonLinearFit::removeConstant | ( | const QString & | parName | ) | [inline] |
| void NonLinearFit::removeConstants | ( | ) | [inline] |
Referenced by FitDialog::accept().
| bool NonLinearFit::removeDataSingularities | ( | ) | [private, virtual] |
Removes any data singularities before fitting.
Reimplemented from Fit.
References d_constants, Fit::d_formula, Filter::d_n, Fit::d_p, Fit::d_param_init, Fit::d_param_names, Filter::d_x, MyParser::EvalRemoveSingularity(), and removePole().
| void NonLinearFit::removePole | ( | int | index | ) | [private] |
References Filter::d_n, Fit::d_w, Filter::d_x, and Filter::d_y.
Referenced by removeDataSingularities().
| void NonLinearFit::setConstant | ( | const QString & | parName, |
| double | val | ||
| ) |
References d_constants.
Referenced by FitDialog::accept().
| bool NonLinearFit::setFormula | ( | const QString & | s, |
| bool | guess = true |
||
| ) | [virtual] |
Reimplemented from Fit.
References d_constants, Fit::d_formula, Filter::d_init_err, Fit::d_p, Fit::d_param_init, Fit::d_param_names, guessParameters(), and setParametersList().
Referenced by FitDialog::accept(), and ApplicationWindow::saveFitFunctions().
| bool NonLinearFit::setParametersList | ( | const QStringList & | lst | ) | [virtual] |
Reimplemented from Fit.
References Filter::d_init_err, Fit::d_p, Fit::d_param_explain, Fit::d_param_names, Fit::freeWorkspace(), and Fit::initWorkspace().
Referenced by FitDialog::accept(), and setFormula().
QMap<QString, double> NonLinearFit::d_constants [private] |
Referenced by calculateFitCurveData(), eval(), insertFitFunctionCurve(), legendInfo(), logFitInfo(), removeDataSingularities(), setConstant(), and setFormula().
1.7.6.1