pub struct vtkFunctionParser(/* private fields */);Expand description
Parse and evaluate a mathematical expression
vtkFunctionParser is a class that takes in a mathematical expression as a char string, parses it, and evaluates it at the specified values of the variables in the input string.
You can use the “if” operator to create conditional expressions such as if ( test, trueresult, falseresult). These evaluate the boolean valued test expression and then evaluate either the trueresult or the falseresult expression to produce a final (scalar or vector valued) value. “test” may contain <,>,=,|,&, and () and all three subexpressions can evaluate arbitrary function operators (ln, cos, +, if, etc)
@par Thanks: Juha Nieminen (juha.nieminen@gmail.com) for relicensing this branch of the function parser code that this class is based upon under the new BSD license so that it could be used in VTK. Note, the BSD license applies to this version of the function parser only (by permission of the author), and not the original library.
@par Thanks: Thomas Dunne (thomas.dunne@iwr.uni-heidelberg.de) for adding code for two-parameter-parsing and a few functions (sign, min, max).
@par Thanks: Sid Sydoriak (sxs@lanl.gov) for adding boolean operations and conditional expressions and for fixing a variety of bugs.
Implementations§
Source§impl vtkFunctionParser
impl vtkFunctionParser
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new vtkFunctionParser wrapped inside vtkNew