| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.12 Evaluate expression
MathGL have a special classes mglExpr and mglExprC for evaluating of formula specified by the string for real and complex numbers correspondingly. These classes are defined in #include <mgl2/data.h> and #include <mgl2/datac.h> correspondingly. It is the fast variant of formula evaluation. At creation it will be recognized and compiled to tree-like internal code. At evaluation stage only fast calculations are performed. There is no difference between lower or upper case in formulas. If argument value lie outside the range of function definition then function returns NaN. See section Textual formulas.
- Constructor on
mglExpr:mglExpr (const char *expr) - Constructor on
mglExprC:mglExprC (const char *expr) - C function:
HMEXmgl_create_expr (const char *expr) - C function:
HAEXmgl_create_cexpr (const char *expr) Parses the formula expr and creates formula-tree. Constructor recursively parses the formula and creates a tree-like structure containing functions and operators for fast further evaluating by
Calc()orCalcD()functions.
- Destructor on
mglExpr:~mglExpr () - Destructor on
mglExprC:~mglExprC () - C function:
voidmgl_delete_expr (HMEXex) - C function:
voidmgl_delete_cexpr (HAEXex) Deletes the instance of class mglExpr.
- Method on
mglExpr:mrealEval (mrealx,mrealy,mrealz) - Method on
mglExprC:dualEval (dualx,dualy,dualz) - C function:
mrealmgl_expr_eval (HMEXex,mrealx,mrealy,mrealz) - C function:
dualmgl_cexpr_eval (HAEXex,dualx,dualy,dualz) Evaluates the formula for
'x','r'=x,'y','n'=y,'z','t'=z,'a','u'=u.
- Method on
mglExpr:mrealEval (mrealvar[26]) - Method on
mglExprC:dualEval (dualvar[26]) - C function:
mrealmgl_expr_eval_v (HMEXex,mreal *var) - C function:
dualmgl_expr_eval_v (HAEXex,dual *var) Evaluates the formula for variables in array var[0,...,’z’-’a’].
- Method on
mglExpr:mrealDiff (chardir,mrealx,mrealy,mrealz) - C function:
mrealmgl_expr_diff (HMEXex,chardir,mrealx,mrealy,mrealz) Evaluates the formula derivation respect to dir for
'x','r'=x,'y','n'=y,'z','t'=z,'a','u'=u.
- Method on
mglExpr:mrealDiff (chardir,mrealvar[26]) - C function:
mrealmgl_expr_diff_v (HMEXex,chardir,mreal *var) Evaluates the formula derivation respect to dir for variables in array var[0,...,’z’-’a’].
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 21, 2014 using texi2html 5.0.
