public abstract class BoundedUnivariateDistribution extends UnivariateDistribution
Modifier and Type | Field and Description |
---|---|
protected double |
lowerBound |
protected double |
upperBound |
name
Constructor and Description |
---|
BoundedUnivariateDistribution(java.lang.String name,
double lowerBound,
double upperBound)
Generates a univariate distribution generating values within the interval [lowerBound, upperBound]
|
Modifier and Type | Method and Description |
---|---|
double |
draw()
Draws a value from the underlying distribution.
|
abstract double |
drawValue()
Method that generates the values from the underlying distributions for the draw-method.
|
double |
getLowerBound() |
double |
getUpperBound() |
getName, toString
public BoundedUnivariateDistribution(java.lang.String name, double lowerBound, double upperBound) throws java.lang.IllegalArgumentException
name
- Name of the distributionlowerBound
- The lower bound for the distribution (guarantees that derived values will be >= lowerBound)upperBound
- The upper bound for the distribution (guarantees that derived values will be <= upperBound)java.lang.IllegalArgumentException
- Will be thrown when lowerBound > upperBoundpublic double draw()
draw
in class UnivariateDistribution
public abstract double drawValue()
public double getLowerBound()
public double getUpperBound()