|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.formula.DefaultParser
public class DefaultParser
Field Summary | |
---|---|
private java.lang.String |
formula
|
private Frame |
frame
|
private Parser |
parser
|
private ASTTreeInfo |
treeInfo
|
Constructor Summary | |
---|---|
DefaultParser(java.lang.String formula,
Frame frame)
|
Method Summary | |
---|---|
FormulaArray |
evaluate()
Evaluates the formula and returns the result as a FormulaArray. |
java.lang.String |
getFormulaAsString()
Gets the String representation of the formula. |
ASTTreeInfo |
parse()
Parses the formula and returns information about the parse tree. |
private void |
preprocess()
|
void |
setCoodinateIndices(int timeStep,
int layer,
int x,
int y)
Sets the coordinate indices under which the next evaluation will take place. |
void |
setVariable(java.lang.String name,
DataFrame value)
Sets the value of the variable to the specified array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String formula
private Parser parser
private Frame frame
private ASTTreeInfo treeInfo
Constructor Detail |
---|
public DefaultParser(java.lang.String formula, Frame frame)
Method Detail |
---|
private void preprocess() throws IllegalFormulaException
IllegalFormulaException
public void setVariable(java.lang.String name, DataFrame value)
setVariable
in interface FormulaParser
name
- the name of the variablevalue
- the array valuepublic FormulaArray evaluate() throws IllegalFormulaException
evaluate
in interface FormulaParser
IllegalFormulaException
- if the formula is invalidpublic java.lang.String getFormulaAsString()
FormulaParser
getFormulaAsString
in interface FormulaParser
public ASTTreeInfo parse() throws IllegalFormulaException
FormulaParser
parse
in interface FormulaParser
IllegalFormulaException
- if there is an error during parsing.public void setCoodinateIndices(int timeStep, int layer, int x, int y)
setCoodinateIndices
in interface FormulaParser
timeStep
- the time step indexlayer
- the layer indexx
- the x indexy
- the y index
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |