Class SamplerBase
java.lang.Object
org.apache.commons.rng.sampling.distribution.SamplerBase
- Direct Known Subclasses:
AhrensDieterExponentialSampler, AhrensDieterMarsagliaTsangGammaSampler, BoxMullerGaussianSampler, BoxMullerLogNormalSampler, ChengBetaSampler, ContinuousUniformSampler, DiscreteUniformSampler, InverseTransformContinuousSampler, InverseTransformDiscreteSampler, InverseTransformParetoSampler, PoissonSampler, RejectionInversionZipfSampler
Deprecated.
Since version 1.1. Class intended for internal use only.
Base class for a sampler.
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Create an instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleDeprecated.Return the nextdoublevalue.protected intnextInt()Deprecated.Return the nextintvalue.protected intnextInt(int max) Deprecated.Return the nextintvalue.protected longnextLong()Deprecated.Return the nextlongvalue.toString()Deprecated.
-
Field Details
-
rng
-
-
Constructor Details
-
SamplerBase
Deprecated.Create an instance.- Parameters:
rng- Generator of uniformly distributed random numbers.
-
-
Method Details
-
nextDouble
protected double nextDouble()Deprecated.Return the nextdoublevalue.- Returns:
- a random value from a uniform distribution in the
interval
[0, 1).
-
nextInt
protected int nextInt()Deprecated.Return the nextintvalue.- Returns:
- a random
intvalue.
-
nextInt
protected int nextInt(int max) Deprecated.Return the nextintvalue.- Parameters:
max- Upper bound (excluded).- Returns:
- a random
intvalue in the interval[0, max).
-
nextLong
protected long nextLong()Deprecated.Return the nextlongvalue.- Returns:
- a random
longvalue.
-
toString
-