|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjabble.Indicator
public abstract class Indicator
Takes a function that calculates a value at each Point (for example: a field, the derivative of a field, the product of two fields, ...) and aggregates it to produce a single one (for example, takes the average, the maximum, ...). The two parts (the function and the aggregation) are defined separately: the function by a FunctionField object, and the aggrgation by a subclass of the Indicator.
| Field Summary | |
|---|---|
protected Grid |
grid
The grid on which the indicator is being calculated. |
| Constructor Summary | |
|---|---|
protected |
Indicator(FunctionField function)
Creates an indicator that uses the given function. |
| Method Summary | |
|---|---|
protected abstract void |
aggregate(double value)
Aggregates the value that are being calculated for this Indicator. |
double |
calculate(Slice slice)
Calculate the given indicator on the given slice. |
abstract void |
init()
Initializes the indicator for the next calculation. |
abstract double |
retrieveAggreateValue()
Returns the value of the indicator for the current iteration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Grid grid
| Constructor Detail |
|---|
protected Indicator(FunctionField function)
function - the function whose values will be aggregated for the indicator| Method Detail |
|---|
public double calculate(Slice slice)
slice - the slice on which to calculate the Indicator
public abstract void init()
protected abstract void aggregate(double value)
value - a new value to be added to the aggregate function calculationpublic abstract double retrieveAggreateValue()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||