Package ubic.basecode.math.distribution
Class UniformProbabilityComputer
- java.lang.Object
-
- ubic.basecode.math.distribution.UniformProbabilityComputer
-
- All Implemented Interfaces:
ProbabilityComputer
public class UniformProbabilityComputer extends Object implements ProbabilityComputer
Generate probabilities from the uniform distribution.- Author:
- pavlidis
-
-
Constructor Summary
Constructors Constructor Description UniformProbabilityComputer()
Create a UniformProbabilityComputer where the density is defined over the unit inteval [0,1].UniformProbabilityComputer(double min, double max)
Create a UniformProbabilityComputer where the density is defined over the interval given
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
probability(double x)
Return the probability associated with a certain value.The upper tail of the associated distribution is returned.double
probability(double x, boolean upperTail)
Return the probability associated with a certain value, with choice of tail.
-
-
-
Constructor Detail
-
UniformProbabilityComputer
public UniformProbabilityComputer()
Create a UniformProbabilityComputer where the density is defined over the unit inteval [0,1].
-
UniformProbabilityComputer
public UniformProbabilityComputer(double min, double max)
Create a UniformProbabilityComputer where the density is defined over the interval given- Parameters:
min
-max
-
-
-
Method Detail
-
probability
public double probability(double x)
Description copied from interface:ProbabilityComputer
Return the probability associated with a certain value.The upper tail of the associated distribution is returned.- Specified by:
probability
in interfaceProbabilityComputer
- Returns:
-
probability
public double probability(double x, boolean upperTail)
Description copied from interface:ProbabilityComputer
Return the probability associated with a certain value, with choice of tail.- Specified by:
probability
in interfaceProbabilityComputer
- Returns:
-
-