Element index for package mathparser
[ c ]
[ d ]
[ e ]
[ f ]
[ g ]
[ i ]
[ m ]
[ n ]
[ o ]
[ p ]
[ s ]
[ t ]
[ v ]
[ _ ]
top
c
- createDefaultFuncs
- in file mathparser.php, method MathParser::createDefaultFuncs()
CreateDefaultFuncs method creates some predefined functions in the parser's list of functions.
- createDefaultVars
- in file mathparser.php, method MathParser::createDefaultVars()
X, Y and PI variables can be predefined and can be immediately used in the expression.
- createFunc
- in file mathparser.php, method MathParser::createFunc()
CreateFunc method creates a new function that takes n number of parameters (could be 0) in the parser's list of functions. If the function name already exists then this method throws Exception.
- createVar
- in file mathparser.php, method MathParser::createVar()
Creates a variable with given name and initial value.
- createVarNode
- in file mathparser.php, method MathParser::createVarNode()
This method can be overridden to return a Node that is fancy enough to lookup values from a database etc to come up with variable values at evaluation time.
top
d
- $Dirty
- in file mathparser.php, variable MathParser::$Dirty
non-public flag that shows if parsing is needed or not. if false, existing parse tree will be re-used.
- deleteAllFuncs
- in file mathparser.php, method MathParser::deleteAllFuncs()
DeleteAllFuncs method deletes all variables from the list of available functions.
- deleteAllVars
- in file mathparser.php, method MathParser::deleteAllVars()
DeleteAllVars method deletes all variables from the list of available variables.
- deleteFunc
- in file mathparser.php, method MathParser::deleteFunc()
DeleteFunc method deletes an existing function from the list of available functions.
- deleteVar
- in file mathparser.php, method MathParser::deleteVar()
DeleteVar method deletes an existing variable from the list of available variables.
top
e
- $err
- in file mathparser.php, variable Mathparser_ParserException::$err
Member variable that holds the error portion of the expression.
- $exp
- in file mathparser.php, variable Mathparser_ParserException::$exp
Member variable that holds the parsed expression itself.
- $Expression
- in file mathparser.php, variable MathParser::$Expression
protected variable that holds the expression to parse.
- evaluate
- in file mathparser.php, method MathParser::evaluate()
Evaluates the expression and returns the result of it. If it cannot be parsed or evaluated then this method throws Exception.
top
f
- $Functions
- in file mathparser.php, variable MathParser::$Functions
internal list of functions that take more than 2 parameters that are available for use in an expression.
- freeParseTree
- in file mathparser.php, method MathParser::freeParseTree()
FreeParseTree can be explicitly called to free the resources taken by the allocated Parse tree when an expression is parsed. FreeParseTree sets the Dirty flag to true so that next time the Evaluate function is called, expression will be parsed forming a new, valid parse tree to be evaluated.
top
g
- getExpression
- in file mathparser.php, method MathParser::getExpression()
Expression property represents the mathematical expression which is input to be Evaluated by the user.
- getFunctions
- in file mathparser.php, method MathParser::getFunctions()
Returns a String array of function names declared for this parser.
- getInvalidPortionOfExpression
- in file mathparser.php, method Mathparser_ParserException::getInvalidPortionOfExpression()
Returns the expression string that cannot be parsed.
- getStrConcatOperator
- in file mathparser.php, method MathParser::getStrConcatOperator()
If you setStringLiteralsAllowed to true, MathParser allows string literals and
- getStringLiteralsAllowed
- in file mathparser.php, method MathParser::getStringLiteralsAllowed()
Can the expression contain string literals such as
- getSubExpression
- in file mathparser.php, method Mathparser_ParserException::getSubExpression()
Returns the subexpression that is the immediate parent of the error portion.
- getTranslationStrings
- in file mathparser.php, method MathParser::getTranslationStrings()
Returns the existing trasnlatable strings used to report error messages.
- getValue
- in file mathparser.php, method MathParser::getValue()
Value property is a read only property which returns the result of the expression.
- getValueAsDouble
- in file mathparser.php, method MathParser::getValueAsDouble()
Value property is a read only property which returns the result of the expression.
- getValueAsString
- in file mathparser.php, method MathParser::getValueAsString()
Value property is a read only property which returns the result of the expression.
- getVariable
- in file mathparser.php, method MathParser::getVariable()
Variable property is a way to set and get variable values.
- getVariableResolver
- in file mathparser.php, method MathParser::getVariableResolver()
VariableResolver is used as a callback function that returns the values of variables when asked.
- getVariables
- in file mathparser.php, method MathParser::getVariables()
Returns the list of variables as an array of Strings.
- getVariablesUsed
- in file mathparser.php, method MathParser::getVariablesUsed()
Returns the list of variables used in the current expression as an array of Strings.
top
i
- isFunction
- in file mathparser.php, method MathParser::isFunction()
Returns true if a function with the name 'funcName' is present in any of the current functions lists. Returns true if a function with the given name is defined. False otherwise.
- isFunctionUsed
- in file mathparser.php, method MathParser::isFunctionUsed()
Returns true if a function with the name 'funcName' is used in the current expression.
- isOptimizationOn
- in file mathparser.php, method MathParser::isOptimizationOn()
Set OptimizationOn to let the bcParser component evaluate constant expressions at parse time. The optimized parse tree will enhance subsequant evaluation operations, though initial parsing will be slower.
- isVariable
- in file mathparser.php, method MathParser::isVariable()
Returns true if a variable with the name 'varName' is present in the current variables list.
- isVariableUsed
- in file mathparser.php, method MathParser::isVariableUsed()
Returns true if a variable with the name 'varName' is used in the current expression.
top
m
- MathParser
- in file mathparser.php, class MathParser
MathParser is a mathematical expression parser class for PHP. MathParser parses and evaluates mathematical formulas given as strings at runtime. Math expressions can contain variables, functions, numeric literals combined with basic mathematical operators +, -, /, *, ^, % (modulus).
- mathparser.php
- procedural page mathparser.php
- Mathparser_ParserException
- in file mathparser.php, class Mathparser_ParserException
ParserException is thrown by some methods of MathParser implementation if an expression cannot be parsed. These methods are: parse(), evaluate(), getValue() User defined functions can choose to throw this exception too.
top
n
- $Node
- in file mathparser.php, variable MathParser::$Node
Starting node for the internal compiled representation of the expression in parsed form.
top
o
- $OptimizationOn
- in file mathparser.php, variable MathParser::$OptimizationOn
when optimization on, after the parse tree is compiled, it will be further optimized by removing sub branches that evaluate to a constant. This will make parse() operation slower and getValue() operation faster.
top
p
- parse
- in file mathparser.php, method MathParser::parse()
Parses the expression and forms a parse tree. Throws Exception if it cannot parse.
top
top
t
- $translator
- in file mathparser.php, variable MathParser::$translator
A dictionary that holds translated messages.
top
top
|
|
|