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
public class SamplerBase
extends java.lang.Object
Deprecated.
Since version 1.1. Class intended for internal use only.
Base class for a sampler.
- Since:
- 1.0
-
Constructor Summary
Constructors Modifier Constructor Description protectedSamplerBase(UniformRandomProvider rng)Deprecated. -
Method Summary
Modifier and Type Method Description protected doublenextDouble()Deprecated.protected intnextInt()Deprecated.protected intnextInt(int max)Deprecated.protected longnextLong()Deprecated.java.lang.StringtoString()Deprecated.
-
Constructor Details
-
SamplerBase
Deprecated.- Parameters:
rng- Generator of uniformly distributed random numbers.
-
-
Method Details
-
nextDouble
protected double nextDouble()Deprecated.- Returns:
- a random value from a uniform distribution in the
interval
[0, 1).
-
nextInt
protected int nextInt()Deprecated.- Returns:
- a random
intvalue.
-
nextInt
protected int nextInt(int max)Deprecated.- Parameters:
max- Upper bound (excluded).- Returns:
- a random
intvalue in the interval[0, max).
-
nextLong
protected long nextLong()Deprecated.- Returns:
- a random
longvalue.
-
toString
public java.lang.String toString()Deprecated.- Overrides:
toStringin classjava.lang.Object
-