PiecewiseConstant
Returns random real numbers uniformly distributed within the given intervals (with default value [0.0, 1.0]), and densities (with default value [1.0]).
The probability density is given by,
where represent the elements of the intervals parameter and a represents the elements of the densities parameter.
Constructors
PiecewiseConstant(const PiecewiseConstant distribution) -> PiecewiseConstant
Copy constructor for PiecewiseConstant distribution.
Parameters
- distribution: PiecewiseConstant distribution to be copied
Symbols
| Name | Description |
|---|---|
= | Copy assignment operator for PiecewiseConstant distribution. |
Members
| Name | Description |
|---|---|
| densities | Weights of each interval. |
| intervals | Boundaries of each interval. |
| max | Returns the maximum possible value from the distribution |
| min | Returns the minimum possible value from the distribution |
| sample | Sample from distribution. |