Interface ContinuousSampler
-
- All Known Subinterfaces:
NormalizedGaussianSampler
,SharedStateContinuousSampler
- All Known Implementing Classes:
AhrensDieterExponentialSampler
,AhrensDieterMarsagliaTsangGammaSampler
,BoxMullerGaussianSampler
,BoxMullerLogNormalSampler
,BoxMullerNormalizedGaussianSampler
,ChengBetaSampler
,ContinuousUniformSampler
,GaussianSampler
,InverseTransformContinuousSampler
,InverseTransformParetoSampler
,LevySampler
,LogNormalSampler
,MarsagliaNormalizedGaussianSampler
,StableSampler
,TSampler
,ZigguratNormalizedGaussianSampler
,ZigguratSampler
,ZigguratSampler.Exponential
,ZigguratSampler.NormalizedGaussian
public interface ContinuousSampler
Sampler that generates values of typedouble
.- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description double
sample()
Creates adouble
sample.default DoubleStream
samples()
Returns an effectively unlimited stream ofdouble
sample values.default DoubleStream
samples(long streamSize)
Returns a stream producing the givenstreamSize
number ofdouble
sample values.
-
-
-
Method Detail
-
sample
double sample()
Creates adouble
sample.- Returns:
- a sample.
-
samples
default DoubleStream samples()
Returns an effectively unlimited stream ofdouble
sample values.The default implementation produces a sequential stream that repeatedly calls
sample
().- Returns:
- a stream of
double
values. - Since:
- 1.5
-
samples
default DoubleStream samples(long streamSize)
Returns a stream producing the givenstreamSize
number ofdouble
sample values.The default implementation produces a sequential stream that repeatedly calls
sample
(); the stream is limited to the givenstreamSize
.- Parameters:
streamSize
- Number of values to generate.- Returns:
- a stream of
double
values. - Since:
- 1.5
-
-