public final class Empirical extends AbstractSamplerFunction
Constructor and Description |
---|
Empirical(boolean exceedMinimum,
boolean exceedMaximum,
int samples,
double... ecdf)
Sets up a sampler for a specified empirical cumulative distribution function.
|
Modifier and Type | Method and Description |
---|---|
Double |
sample() |
double |
sample(double u) |
apply
isDensifying
public Empirical(boolean exceedMinimum, boolean exceedMaximum, int samples, double... ecdf)
exceedMinimum
- Should we generate samples less than the smallest quantile (i.e. generate a left tail)?exceedMaximum
- Should we generate samples greater than the largest observed quantile (i.e. generate a right
tail)?samples
- The number of samples observed to get the quantiles.ecdf
- Alternating values that represent which percentile (in the [0..1] range)
and values. For instance, if you have the min, median and max of 1, 3, 10
you should pass 0.0, 1, 0.5, 3, 1.0, 10. Note that the list must include
the 0-th (1.0-th) quantile if the left (right) tail is not allowed.Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.