#include <vtkFunctionParser.h>
Inheritance diagram for vtkFunctionParser:
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.
Definition at line 82 of file vtkFunctionParser.h.
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
int | IsScalarResult () |
int | IsVectorResult () |
char * | GetScalarVariableName (int i) |
char * | GetVectorVariableName (int i) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetFunction (const char *function) |
virtual char * | GetFunction () |
double | GetScalarResult () |
double * | GetVectorResult () |
void | GetVectorResult (double result[3]) |
void | SetScalarVariableValue (const char *variableName, double value) |
void | SetScalarVariableValue (int i, double value) |
double | GetScalarVariableValue (const char *variableName) |
double | GetScalarVariableValue (int i) |
void | SetVectorVariableValue (const char *variableName, double xValue, double yValue, double zValue) |
void | SetVectorVariableValue (const char *variableName, const double values[3]) |
void | SetVectorVariableValue (int i, double xValue, double yValue, double zValue) |
void | SetVectorVariableValue (int i, const double values[3]) |
double * | GetVectorVariableValue (const char *variableName) |
void | GetVectorVariableValue (const char *variableName, double value[3]) |
double * | GetVectorVariableValue (int i) |
void | GetVectorVariableValue (int i, double value[3]) |
virtual int | GetNumberOfScalarVariables () |
virtual int | GetNumberOfVectorVariables () |
void | RemoveAllVariables () |
virtual void | SetReplaceInvalidValues (int) |
virtual int | GetReplaceInvalidValues () |
virtual void | ReplaceInvalidValuesOn () |
virtual void | ReplaceInvalidValuesOff () |
virtual void | SetReplacementValue (double) |
virtual double | GetReplacementValue () |
Static Public Member Functions | |
static vtkFunctionParser * | New () |
static int | IsTypeOf (const char *type) |
static vtkFunctionParser * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkFunctionParser () | |
~vtkFunctionParser () | |
int | Parse () |
void | Evaluate () |
int | CheckSyntax () |
void | RemoveSpaces () |
char * | RemoveSpacesFrom (const char *variableName) |
int | OperatorWithinVariable (int idx) |
int | BuildInternalFunctionStructure () |
void | BuildInternalSubstringStructure (int beginIndex, int endIndex) |
void | AddInternalByte (unsigned char newByte) |
int | IsSubstringCompletelyEnclosed (int beginIndex, int endIndex) |
int | FindEndOfMathFunction (int beginIndex) |
int | FindEndOfMathConstant (int beginIndex) |
int | IsVariableName (int currentIndex) |
int | IsElementaryOperator (int op) |
int | GetMathFunctionNumber (int currentIndex) |
int | GetMathFunctionStringLength (int mathFunctionNumber) |
int | GetMathConstantNumber (int currentIndex) |
int | GetMathConstantStringLength (int mathConstantNumber) |
int | GetElementaryOperatorNumber (char op) |
int | GetOperandNumber (int currentIndex) |
int | GetVariableNameLength (int variableNumber) |
int | DisambiguateOperators () |
Protected Attributes | |
char * | Function |
int | FunctionLength |
int | NumberOfScalarVariables |
int | NumberOfVectorVariables |
char ** | ScalarVariableNames |
char ** | VectorVariableNames |
double * | ScalarVariableValues |
double ** | VectorVariableValues |
unsigned char * | ByteCode |
int | ByteCodeSize |
double * | Immediates |
int | ImmediatesSize |
double * | Stack |
int | StackSize |
int | StackPointer |
vtkTimeStamp | FunctionMTime |
vtkTimeStamp | ParseMTime |
vtkTimeStamp | VariableMTime |
vtkTimeStamp | EvaluateMTime |
int | ReplaceInvalidValues |
double | ReplacementValue |
|
Reimplemented from vtkObject. Definition at line 86 of file vtkFunctionParser.h. |
|
|
|
|
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. |
|
Reimplemented from vtkObject. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. |
|
Reimplemented from vtkObject. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. |
|
Set/Get input string to evaluate. |
|
|
|
Check whether the result is a scalar result. If it isn't, then either the result is a vector or an error has occurred. |
|
Check whether the result is a vector result. If it isn't, then either the result is scalar or an error has occurred. |
|
Get a scalar result from evaluating the input function. |
|
Get a vector result from evaluating the input function. |
|
Get a scalar result from evaluating the input function. Definition at line 109 of file vtkFunctionParser.h. |
|
Set the value of a scalar variable. If a variable with this name exists, then its value will be set to the new value. If there is not already a variable with this name, variableName will be added to the list of variables, and its value will be set to the new value. |
|
Set the value of a scalar variable. If a variable with this name exists, then its value will be set to the new value. If there is not already a variable with this name, variableName will be added to the list of variables, and its value will be set to the new value. |
|
Get the value of a scalar variable. |
|
Get the value of a scalar variable. |
|
Set the value of a vector variable. If a variable with this name exists, then its value will be set to the new value. If there is not already a variable with this name, variableName will be added to the list of variables, and its value will be set to the new value. |
|
Set the value of a vector variable. If a variable with this name exists, then its value will be set to the new value. If there is not already a variable with this name, variableName will be added to the list of variables, and its value will be set to the new value. Definition at line 136 of file vtkFunctionParser.h. |
|
Set the value of a vector variable. If a variable with this name exists, then its value will be set to the new value. If there is not already a variable with this name, variableName will be added to the list of variables, and its value will be set to the new value. |
|
Set the value of a vector variable. If a variable with this name exists, then its value will be set to the new value. If there is not already a variable with this name, variableName will be added to the list of variables, and its value will be set to the new value. Definition at line 141 of file vtkFunctionParser.h. |
|
Get the value of a vector variable. |
|
Get the value of a vector variable. Definition at line 148 of file vtkFunctionParser.h. |
|
Get the value of a vector variable. |
|
Get the value of a vector variable. Definition at line 152 of file vtkFunctionParser.h. |
|
Get the number of scalar variables. |
|
Get the number of vector variables. |
|
Get the ith scalar variable name. |
|
Get the ith vector variable name. |
|
Remove all the current variables. |
|
When ReplaceInvalidValues is on, all invalid values (such as sqrt(-2), note that function parser does not handle complex numbers) will be replaced by ReplacementValue. Otherwise an error will be reported |
|
Remove all the current variables. |
|
Remove all the current variables. |
|
Remove all the current variables. |
|
Remove all the current variables. |
|
Remove all the current variables. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 221 of file vtkFunctionParser.h. |
|
Definition at line 222 of file vtkFunctionParser.h. |
|
Definition at line 223 of file vtkFunctionParser.h. |
|
Definition at line 224 of file vtkFunctionParser.h. |
|
Definition at line 225 of file vtkFunctionParser.h. |
|
Definition at line 226 of file vtkFunctionParser.h. |
|
Definition at line 227 of file vtkFunctionParser.h. |
|
Definition at line 228 of file vtkFunctionParser.h. |
|
Definition at line 229 of file vtkFunctionParser.h. |
|
Definition at line 230 of file vtkFunctionParser.h. |
|
Definition at line 231 of file vtkFunctionParser.h. |
|
Definition at line 232 of file vtkFunctionParser.h. |
|
Definition at line 233 of file vtkFunctionParser.h. |
|
Definition at line 234 of file vtkFunctionParser.h. |
|
Definition at line 235 of file vtkFunctionParser.h. |
|
Definition at line 237 of file vtkFunctionParser.h. |
|
Definition at line 238 of file vtkFunctionParser.h. |
|
Definition at line 239 of file vtkFunctionParser.h. |
|
Definition at line 240 of file vtkFunctionParser.h. |
|
Definition at line 242 of file vtkFunctionParser.h. |
|
Definition at line 243 of file vtkFunctionParser.h. |