#include <equ.h>
Public Member Functions | |
void | Differentiate (Equation *, int, Parser *) |
Equation () | |
double | Evaluate () |
double | FindRoot (range, int) |
double | NumInt (range, int) |
void | PowerSeries (Equation *, int, int, Parser *) |
double | RK4 (range, int, int) |
char * | VarText (int) |
double | VarValue (int) |
~Equation () | |
Public Attributes | |
int | DiffVar |
char * | EquationText |
bool | Radians |
QList< variable > | Variables |
Private Member Functions | |
void | AddPowerSeriesTerm (int, Node *, double, double, Parser *) |
void | DiffFromNode (Node *, Node **) |
void | EvalNode (Node *) |
variable * | NumToVarPtr (int) |
void | RemoveBrackets () |
Private Attributes | |
int | brackets |
Friends | |
class | Parser |
Definition at line 58 of file equ.h.
Equation | ( | ) |
Definition at line 37 of file equ.cpp.
References EquationText, Radians, QList< type >::setAutoDelete(), and Variables.
Referenced by PowerSeries().
~Equation | ( | ) |
Definition at line 46 of file equ.cpp.
References QList< type >::clear(), EquationText, and Variables.
void AddPowerSeriesTerm | ( | int | var, | |
Node * | coeff, | |||
double | power, | |||
double | about, | |||
Parser * | parser | |||
) | [private] |
Definition at line 817 of file equ.cpp.
References QList< type >::at(), Node::Brackets, Node::Child_One, Node::Child_Two, TTree::Copy(), Node::evalfn, factorial(), func_details, mathfunc_s::func_ptr, TTree::InitNode(), MTK_ADD, MTK_DIVIDE, MTK_MULTIPLY, MTK_NUMBER, MTK_POWER, MTK_SUBTRACT, MTK_VARIABLE, NumVar::Number, Node::Parent, TTree::Reset(), TTree::Root, Parser::TidyUpEqn(), Node::Type, variable::Value, Node::Value, Variables, and NumVar::WhichVar.
Referenced by PowerSeries().
Definition at line 223 of file equ.cpp.
References QList< type >::append(), DiffFromNode(), DiffVar, QList< type >::first(), variable::Name, QList< type >::next(), TTree::Root, Parser::TreeToText(), variable::Value, and Variables.
Referenced by graphmat::read().
Definition at line 243 of file equ.cpp.
References TTree::AddBelowOne(), TTree::AddBelowTwo(), Node::Child_One, Node::Child_Two, TTree::Copy(), DiffVar, ERR_DIFF, TTree::InitNode(), MTK_ADD, MTK_ARCCOS, MTK_ARCOSH, MTK_ARCSIN, MTK_ARCTAN, MTK_ARSINH, MTK_ARTANH, MTK_COS, MTK_COSEC, MTK_COSH, MTK_COT, MTK_DIVIDE, MTK_EXP, MTK_LN, MTK_LOG, MTK_MULTIPLY, MTK_NUMBER, MTK_PI_SYM, MTK_POWER, MTK_SEC, MTK_SIN, MTK_SINH, MTK_SUBTRACT, MTK_TAN, MTK_TANH, MTK_VARIABLE, Node::Parent, Node::Type, and Node::Value.
Referenced by Differentiate(), and PowerSeries().
void EvalNode | ( | Node * | TreePos | ) | [private] |
Definition at line 112 of file equ.cpp.
References ansi_jn(), Node::Brackets, Node::Child_One, Node::Child_Two, combination(), Node::CurrentValue, DEGTORAD, EDIVZERO, EINEXACT, ERR_DIV_ZERO, ERR_DOM, ERR_FUNCTION, ERR_INEXACT, ERR_RANGE, Node::evalfn, EZERO, MTK_ADD, MTK_ARCTAN, MTK_BESSJ, MTK_COMBINATION, MTK_COT, MTK_DIVIDE, MTK_MULTIPLY, MTK_PERMUTATION, MTK_POWER, MTK_SIN, MTK_SUBTRACT, permutation(), Radians, and Node::Type.
Referenced by Evaluate().
double Evaluate | ( | ) |
Definition at line 54 of file equ.cpp.
References QList< type >::at(), Node::Brackets, Node::Child_One, Node::Child_Two, Node::CurrentValue, ERR_VARIABLES, EvalNode(), MTK_NUMBER, MTK_PI_SYM, MTK_VARIABLE, Node::Parent, TTree::Reset(), TTree::Root, Node::Type, variable::Value, Node::Value, Variables, and NumVar::WhichVar.
Referenced by FindRoot(), pvalt::getval(), entitybocon::getval(), entityload::getval(), gfunct::getval(), graphmat::matstiff(), graphmat::nlstresses(), NumInt(), and RK4().
double FindRoot | ( | range | Range, | |
int | var_num | |||
) |
Definition at line 641 of file equ.cpp.
References range::Accuracy, QList< type >::at(), ERR_NO_ROOT, Evaluate(), range::From, range::To, variable::Value, and Variables.
double NumInt | ( | range | Range, | |
int | var_num | |||
) |
Definition at line 610 of file equ.cpp.
References QList< type >::at(), ERR_VARIABLES, Evaluate(), range::From, range::Step, range::To, variable::Value, and Variables.
variable* NumToVarPtr | ( | int | ) | [private] |
Definition at line 756 of file equ.cpp.
References AddPowerSeriesTerm(), QList< type >::append(), QList< type >::at(), DiffFromNode(), DiffVar, Equation(), ERR_VARIABLES, QList< type >::first(), variable::Name, QList< type >::next(), Node::Parent, Radians, TTree::Root, Parser::TidyUpEqn(), Parser::TreeToText(), variable::Value, and Variables.
void RemoveBrackets | ( | ) | [private] |
double RK4 | ( | range | Range, | |
int | var_num1, | |||
int | var_num2 | |||
) |
Definition at line 719 of file equ.cpp.
References range::Accuracy, QList< type >::at(), Evaluate(), range::From, range::Step, range::To, variable::Value, and Variables.
char * VarText | ( | int | num | ) |
Definition at line 192 of file equ.cpp.
References QList< type >::at(), variable::Name, and Variables.
double VarValue | ( | int | num | ) |
Definition at line 204 of file equ.cpp.
References QList< type >::at(), memset(), variable::Value, and Variables.
int brackets [private] |
Definition at line 88 of file equ.h.
Referenced by Parser::ErrorCheck(), Parser::PassOne(), and Parser::Symbol().
int DiffVar |
Definition at line 84 of file equ.h.
Referenced by Differentiate(), DiffFromNode(), and PowerSeries().
char* EquationText |
Definition at line 83 of file equ.h.
Referenced by Equation(), Parser::TextToTree(), Parser::TreeToText(), and ~Equation().
bool Radians |
Definition at line 85 of file equ.h.
Referenced by Equation(), EvalNode(), PowerSeries(), and Parser::TidyNode().
Definition at line 82 of file equ.h.
Referenced by AddPowerSeriesTerm(), entitybocon::checkvar2coord(), gfunct::copy(), Differentiate(), Parser::EndFunc(), Equation(), Evaluate(), FindRoot(), entitybocon::getval(), entityload::getval(), gfunct::getval(), Parser::NodeText(), NumInt(), PowerSeries(), pvalt::read(), gfunct::read(), RK4(), entitybocon::var2coord(), entityload::var2coord(), VarText(), VarValue(), and ~Equation().