org.jasen.core.calculators
Class AverageCalculator

java.lang.Object
  extended byorg.jasen.core.calculators.AverageCalculator
All Implemented Interfaces:
ProbabilityCalculator

public class AverageCalculator
extends Object
implements ProbabilityCalculator

Calculates the final probability using a simple average (mean) function.

Author:
Jason Polites

Constructor Summary
AverageCalculator()
           
 
Method Summary
 double calculate(double[] probabilities, int start, int end)
          Calculates the combined probability of the set of probabilities passed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AverageCalculator

public AverageCalculator()
Method Detail

calculate

public double calculate(double[] probabilities,
                        int start,
                        int end)
                 throws JasenException
Description copied from interface: ProbabilityCalculator
Calculates the combined probability of the set of probabilities passed

Specified by:
calculate in interface ProbabilityCalculator
Parameters:
probabilities - The probability set
start - The start index in the set to be used
end - The end index in the set to be used
Returns:
A single primitive double between 0.0 and 1.0
Throws:
JasenException