#include <vtkFunctionParser.h>
Inheritance diagram for vtkFunctionParser:
Public Methods | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
int | IsScalarResult () |
int | IsVectorResult () |
double | GetScalarResult () |
char * | GetScalarVariableName (int i) |
char * | GetVectorVariableName (int i) |
void | SetFunction (const char *function) |
virtual char * | GetFunction () |
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 () |
Static Public Methods | |
vtkFunctionParser * | New () |
int | IsTypeOf (const char *type) |
vtkFunctionParser * | SafeDownCast (vtkObject *o) |
Protected Methods | |
vtkFunctionParser () | |
~vtkFunctionParser () | |
int | Parse () |
void | Evaluate () |
int | CheckSyntax () |
void | RemoveSpaces () |
int | BuildInternalFunctionStructure () |
void | BuildInternalSubstringStructure (int beginIndex, int endIndex) |
void | AddInternalByte (unsigned char newByte) |
int | IsSubstringCompletelyEnclosed (int beginIndex, int endIndex) |
int | FindEndOfMathFunction (int beginIndex) |
int | IsVariableName (int currentIndex) |
int | IsElementaryOperator (int op) |
int | GetMathFunctionNumber (int currentIndex) |
int | GetMathFunctionStringLength (int mathFunctionNumber) |
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 |
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 96 of file vtkFunctionParser.h.
|
|
|
|
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. |
|
Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. 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 vtkTypeMacro 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 vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkObject. |
|
Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. 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. |
|
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 vector result from evaluating the input function. Definition at line 123 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 150 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 155 of file vtkFunctionParser.h. |
|
Get the value of a vector variable. |
|
Get the value of a vector variable. Definition at line 162 of file vtkFunctionParser.h. |
|
Get the value of a vector variable. |
|
Get the value of a vector variable. Definition at line 166 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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 215 of file vtkFunctionParser.h. |
|
Definition at line 216 of file vtkFunctionParser.h. |
|
Definition at line 217 of file vtkFunctionParser.h. |
|
Definition at line 218 of file vtkFunctionParser.h. |
|
Definition at line 219 of file vtkFunctionParser.h. |
|
Definition at line 220 of file vtkFunctionParser.h. |
|
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 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. |