jabble
Class FieldCalculator

java.lang.Object
  extended by jabble.FieldCalculator

public class FieldCalculator
extends java.lang.Object

An object of this class is able to calculate a Field as a function of a set of other Fields. FieldCalculators allow to quickly add or remove calculation of Fields that are not critical for the stability of the solution, and might not even need to be calculated at every iteration.


Constructor Summary
FieldCalculator(java.lang.String fieldName, FunctionField function)
          The new object will calculate the Field named fieldName according to the function given.
 
Method Summary
 void processPoint(Point point)
          Calculates the function at the given point and updates the value of the Field.
 void setupFields(java.util.List<Slice> slices)
          Sets up the appropriate data stracture so that the FieldCalculator will operate on the given list of slices.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldCalculator

public FieldCalculator(java.lang.String fieldName,
                       FunctionField function)
The new object will calculate the Field named fieldName according to the function given.

Parameters:
fieldName - the name of a field as specified in an EquationSet
function - a FunctionField object
Throws:
java.lang.IllegalArgumentException - if function of fieldName are null
Method Detail

setupFields

public void setupFields(java.util.List<Slice> slices)
Sets up the appropriate data stracture so that the FieldCalculator will operate on the given list of slices.

Parameters:
slices - The list of slices on which to calculate the boundaries.

processPoint

public void processPoint(Point point)
Calculates the function at the given point and updates the value of the Field.

Parameters:
point - the point at which to make the update of the field