org.jasen.core.calculators
Class AverageCalculator
java.lang.Object
org.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
Method Summary |
double |
calculate(double[] probabilities,
int start,
int end)
Calculates the combined probability of the set of probabilities passed |
AverageCalculator
public AverageCalculator()
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 setstart
- The start index in the set to be usedend
- The end index in the set to be used
- Returns:
- A single primitive double between 0.0 and 1.0
- Throws:
JasenException