MyParser Class Reference

Mathematical parser class based on muParser. More...

`#include <MyParser.h>`

Inheritance diagram for MyParser:

## Classes

class | Pole
class | Singularity

## Public Member Functions

void | addGSLConstants ()
double | DiffRemoveSingularity (double *xvar, double *a_Var, double a_fPos) const
double | EvalRemoveSingularity (double *xvar, bool noisy=true) const
| MyParser ()
void | setLocale (const QLocale &locale)

## Static Public Member Functions

static QString | explainFunction (int index)
static const QStringList | functionNamesList ()
static const QStringList | functionsList ()
static QLocale | getLocale ()
static void | SingularityErrorMessage (double xvar)

## Detailed Description

Mathematical parser class based on muParser.

# Future Plans

Eliminate in favour of Script/ScriptingEnv. This will allow you to use e.g. Python's global variables and functions everywhere. Before this happens, a cleaner and more generic solution for accessing the current ScriptingEnv should be implemented (maybe by making it a property of Project; see ApplicationWindow).

## Constructor & Destructor Documentation

## MyParser()

MyParser::MyParser | ( |  | ) |

References getLocale(), M_PI, muParserScripting::math_functions, muParserScripting::mathFunction::name, and setLocale().

## Member Function Documentation

## addGSLConstants()

void MyParser::addGSLConstants | ( |  | ) |

Referenced by DoubleSpinBox::interpretText(), and muParserScript::muParserScript().

## DiffRemoveSingularity()

double MyParser::DiffRemoveSingularity | ( | double * | xvar,
|  | double * | a_Var,
|  | double | a_fPos
| ) |  | const

References EvalRemoveSingularity().

Referenced by user_df().

## EvalRemoveSingularity()

double MyParser::EvalRemoveSingularity | ( | double * | xvar,
|  | bool | noisy = `true`
| ) |  | const

Referenced by NonLinearFit::calculateFitCurveData(), DiffRemoveSingularity(), NonLinearFit::eval(), FunctionCurve::loadData(), NonLinearFit::removeDataSingularities(), user_d(), and user_f().

## explainFunction()

QString MyParser::explainFunction | ( | int | index | ) |

static

References muParserScripting::mathFunction::description, getLocale(), and muParserScripting::math_functions.

Referenced by FitDialog::showExpression(), and FunctionDialog::updateFunctionExplain().

## functionNamesList()

const QStringList MyParser::functionNamesList | ( |  | ) |

static

References muParserScripting::math_functions, and muParserScripting::mathFunction::name.

Referenced by ScriptEdit::ScriptEdit().

## functionsList()

const QStringList MyParser::functionsList | ( |  | ) |

static

References getLocale(), muParserScripting::math_functions, and muParserScripting::mathFunction::name.

Referenced by FunctionDialog::FunctionDialog(), IntDialog::IntDialog(), and FitDialog::showParseFunctions().

## getLocale()

QLocale MyParser::getLocale | ( |  | ) |

static

References ApplicationWindow::d_muparser_c_locale.

Referenced by explainFunction(), functionsList(), and MyParser().

## setLocale()

void MyParser::setLocale | ( | const QLocale & | locale | ) |

Referenced by DoubleSpinBox::interpretText(), and MyParser().

## SingularityErrorMessage()

static void MyParser::SingularityErrorMessage | ( | double | xvar | ) |

static

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

- qtiplot/src/scripting/MyParser.h
- qtiplot/src/scripting/MyParser.cpp