Maths
Class CompiledFunction.Subtract

java.lang.Object
  extended by Maths.CompiledFunction.Subtract
All Implemented Interfaces:
CompiledFunction
Enclosing interface:
CompiledFunction

public static class CompiledFunction.Subtract
extends java.lang.Object
implements CompiledFunction

The subtract function


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.Subtract(CompiledFunction a, CompiledFunction b)
          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

CompiledFunction.Subtract

public CompiledFunction.Subtract(CompiledFunction a,
                                 CompiledFunction b)
Default constructor

Parameters:
a - a in a - b
b - b in a - b
Method Detail

compute

public double compute(java.util.Map<java.lang.String,java.lang.Double> values)
               throws NoSuchVariable
Description copied from interface: CompiledFunction
Computes the result of the function

Specified by:
compute in interface CompiledFunction
Parameters:
values - Map from variable name to value
Returns:
The value of the function
Throws:
NoSuchVariable - Thrown if values does not contain a needed variable

neededParams

public java.util.Set<java.lang.String> neededParams()
Description copied from interface: CompiledFunction
Returns a list of variable that the function expects to be passed to it

Specified by:
neededParams in interface CompiledFunction
Returns:
The list of variable names tyhat need to be passed