jabble.indicators
Class AverageIndicator

java.lang.Object
  extended by jabble.Indicator
      extended by jabble.indicators.AverageIndicator

public class AverageIndicator
extends Indicator

Calculates the spatial average of a field on a slice.


Field Summary
 
Fields inherited from class jabble.Indicator
grid
 
Constructor Summary
AverageIndicator(FunctionField function)
           
 
Method Summary
 void aggregate(double value)
          Aggregates the value that are being calculated for this Indicator.
 void init()
          Initializes the indicator for the next calculation.
 double retrieveAggreateValue()
          Returns the value of the indicator for the current iteration.
 
Methods inherited from class jabble.Indicator
calculate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AverageIndicator

public AverageIndicator(FunctionField function)
Method Detail

init

public void init()
Description copied from class: Indicator
Initializes the indicator for the next calculation. This function should reset the aggregate value.

Specified by:
init in class Indicator

aggregate

public void aggregate(double value)
Description copied from class: Indicator
Aggregates the value that are being calculated for this Indicator.

Specified by:
aggregate in class Indicator
Parameters:
value - a new value to be added to the aggregate function calculation

retrieveAggreateValue

public double retrieveAggreateValue()
Description copied from class: Indicator
Returns the value of the indicator for the current iteration.

Specified by:
retrieveAggreateValue in class Indicator
Returns:
the value of the indicator