|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.Node<String>
vec_math.StringNode
vec_math.ExpressionNode
vec_math.ExpressionMultidimensional
public class ExpressionMultidimensional
A representation of a Multidimensional function using a
parsable expression. The expression must be of the following format:
sin($0)+cos($1)+$3-exp($2),where evaluation is done by replacing the variables
$n with
the arguments of the VectorG supplied.
| Nested Class Summary | |
|---|---|
static class |
ExpressionMultidimensional.Test
Test by evaluating an arbitrary function at the provided position. |
| Field Summary | |
|---|---|
private Map<String,Integer> |
lookup
The lookup table linking variable names to vector indices. |
| Constructor Summary | |
|---|---|
ExpressionMultidimensional(String node,
int dimension)
Constructs a new expression using a specified string. |
|
ExpressionMultidimensional(String node,
Map<String,Integer> varna)
Constructs a new expression using a specified string and a specific variable name lookup table. |
|
ExpressionMultidimensional(StringNode par,
String root,
int level)
Constructs a daugther node. |
|
| Method Summary | |
|---|---|
int |
dimension()
The number of variables define the number of dimensions, if we have not set a dimension from the outside. |
double |
evaluate(VectorG x)
The expression is checked for the occurence of the variable. |
| Methods inherited from class vec_math.ExpressionNode |
|---|
getValue, isVariable |
| Methods inherited from class vec_math.StringNode |
|---|
getVariables, parseOperator, parseSub, replaceVariable, replaceVariable, setValidOperator |
| Methods inherited from class vec_math.Node |
|---|
equals, getLevel, getParent, getParseSource, getSub, getSubAt, getSubNodeNumber, getTie, isFinal, isParsed, isRoot, parse, parse, setParse, setParseSource, setSub, setTie, setValue, toString, traceVariable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private Map<String,Integer> lookup
| Constructor Detail |
|---|
public ExpressionMultidimensional(String node,
int dimension)
evaluate(vec_math.VectorG)
public ExpressionMultidimensional(String node,
Map<String,Integer> varna)
evaluate(vec_math.VectorG) vector argument.
public ExpressionMultidimensional(StringNode par,
String root,
int level)
| Method Detail |
|---|
public int dimension()
dimension in interface Multidimensionalpublic double evaluate(VectorG x)
evaluate in interface Multidimensional
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||