QtiPlot 0.9.7.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

NonLinearFit Class Reference

#include <NonLinearFit.h>

Inheritance diagram for NonLinearFit:
Fit Filter

List of all members.

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, QwtPlotCurve *c, double start, double end)
 NonLinearFit (ApplicationWindow *parent, Graph *g)
 NonLinearFit (ApplicationWindow *parent, QwtPlotCurve *c)
 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)
 NonLinearFit (ApplicationWindow *parent, Graph *g, const QString &curveTitle)
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

FunctionCurveinsertFitFunctionCurve (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

Constructor & Destructor Documentation

NonLinearFit::NonLinearFit ( ApplicationWindow parent,
Graph g 
)

References init().

NonLinearFit::NonLinearFit ( ApplicationWindow parent,
QwtPlotCurve *  c 
)
NonLinearFit::NonLinearFit ( ApplicationWindow parent,
QwtPlotCurve *  c,
double  start,
double  end 
)
NonLinearFit::NonLinearFit ( ApplicationWindow parent,
Graph g,
const QString &  curveTitle 
)
NonLinearFit::NonLinearFit ( ApplicationWindow parent,
Graph g,
const QString &  curveTitle,
double  start,
double  end 
)
NonLinearFit::NonLinearFit ( ApplicationWindow parent,
Table t,
const QString &  xCol,
const QString &  yCol,
int  startRow = 1,
int  endRow = -1 
)

References init(), and Fit::setDataFromTable().


Member Function Documentation

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]

Referenced by user_d(), user_df(), and user_f().

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]
void NonLinearFit::init ( ) [private]
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]
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]
bool NonLinearFit::setParametersList ( const QStringList &  lst) [virtual]

Member Data Documentation

QMap<QString, double> NonLinearFit::d_constants [private]

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