|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMaths.CompiledFunction.Variable
public static class CompiledFunction.Variable
Represents a variable - simply returns the value of the variable
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface Maths.CompiledFunction |
---|
CompiledFunction.Add, CompiledFunction.Constant, CompiledFunction.Divide, CompiledFunction.Function, CompiledFunction.Multiply, CompiledFunction.Power, CompiledFunction.Subtract, CompiledFunction.Variable |
Constructor Summary | |
---|---|
CompiledFunction.Variable(java.lang.String v)
Default constructor |
Method Summary | |
---|---|
double |
compute(java.util.Map<java.lang.String,java.lang.Double> values)
Computes the result of the function |
java.util.Set<java.lang.String> |
neededParams()
Returns a list of variable that the function expects to be passed to it |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompiledFunction.Variable(java.lang.String v)
v
- The variables nameMethod Detail |
---|
public double compute(java.util.Map<java.lang.String,java.lang.Double> values) throws NoSuchVariable
CompiledFunction
compute
in interface CompiledFunction
values
- Map from variable name to value
NoSuchVariable
- Thrown if values does not contain a needed variablepublic java.util.Set<java.lang.String> neededParams()
CompiledFunction
neededParams
in interface CompiledFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |