131 virtual void reset() = 0;
238 virtual void reset();
320 virtual void reset();
784 itsVariance(variance)
949 itsVariance(variance)
virtual Vector< Double > parameters() const
void reseed(Int s1, Int s2)
Double mean() const
Functions that allow you to query and change the parameters of the discrete uniform distribution...
virtual void reset()
Resets the random number generator.
virtual Bool checkParameters(const Vector< Double > &parms) const
Negative exponential distribution.
Binomial(RNG *gen, uInt n=1, Double p=0.5)
Construct a random number generator for a binomial distribution.
virtual Double operator()()
Returns a value from the Binomial distribution.
RNG * generator()
Functions that allow you to access and change the class that generates the random bits...
virtual Vector< Double > parameters() const
virtual Bool checkParameters(const Vector< Double > &parms) const
virtual void setParameters(const Vector< Double > &parms)=0
These function allow you to manipulate the parameters (mean variance etc.) of random number distribut...
virtual Vector< Double > parameters() const
2 parameters, the mean and variance.
virtual Double operator()()
Returns a value from the hypergeometric distribution.
virtual Bool checkParameters(const Vector< Double > &parms) const
Float asFloat()
Return random bits converted to either a Float or a Double.
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (mean & variance) described above through the b...
virtual Double operator()()
Returns a value from the Erlang distribution.
Erlang(RNG *gen, Double mean=1.0, Double variance=1.0)
Construct a random number generator for an Erlang distribution.
Geometric(RNG *gen, Double probability=0.5)
Construct a random number generator for a geometric uniform distribution.
virtual Bool checkParameters(const Vector< Double > &parms) const
virtual Vector< Double > parameters() const
virtual Bool checkParameters(const Vector< Double > &parms) const
2 parameters, mean and variance.
Discrete geometric distribution.
virtual ~MLCG()
The destructor is trivial.
static Random * construct(Random::Types type, RNG *gen)
Convert the Random::Type enumerator to a specific object (derived from Random but upcast to a Random ...
Types
This enumerator lists all the predefined random number distributions.
virtual Bool checkParameters(const Vector< Double > &parms) const
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (alpha & beta) described above through the base...
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (mean & variance) described above through the b...
virtual Double operator()()
Returns a value from the negative exponential distribution.
virtual ~Binomial()
The destructor is trivial.
virtual uInt asuInt()=0
Return the 32-random bits as an unsigned integer.
Base class for random number distributions.
virtual Vector< Double > parameters() const
Additive number generator.
virtual ~Erlang()
The destructor is trivial.
ACG(uInt seed=0, Int size=55)
The constructor allows you to specify seeds.
Hypergeometric distribution.
Weibull(RNG *gen, Double alpha=1.0, Double beta=1.0)
Construct a random number generator for a uniform distribution.
virtual Vector< Double > parameters() const
virtual ~Geometric()
The destructor is trivial.
virtual Vector< Double > parameters() const
static Random::Types asType(const String &str)
Convert the string to enumerator.
virtual ~RNG()
A virtual destructor is needed to ensure that the destructor of derived classes gets used...
Double probability() const
Functions that allow you to query and change the parameters of the geometric uniform distribution...
virtual Double variance() const
virtual Double operator()()
Returns a value from the Poisson distribution.
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (n & p) described above through the base class...
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (mean & variance) described above through the b...
virtual Double variance() const
virtual Double mean() const
Functions that allow you to query and change the parameters of the normal distribution.
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (mean & variance) described above through the b...
virtual Bool checkParameters(const Vector< Double > &parms) const
virtual Double operator()()
Returns a value from the Weiball distribution.
Int seed1() const
Functions that allow the user to retrieve or change the seed integers.
Normal or Gaussian distribution.
static Vector< Double > defaultParameters(Random::Types type)
returns the default parameters for the specified distribution.
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (mean) described above through the base class...
static String asString(Random::Types type)
Convert the enumerator to a lower-case string.
2 parameters, mean and variance.
virtual ~HyperGeometric()
The destructor is trivial.
Normal(RNG *gen, Double mean=0.0, Double variance=1.0)
Construct a random number generator for a normal distribution.
virtual Bool checkParameters(const Vector< Double > &parms) const
bool Bool
Define the standard types used by Casacore.
virtual Double operator()()=0
This function returns a random number from the appropriate distribution.
virtual Bool checkParameters(const Vector< Double > &parms) const
virtual Bool checkParameters(const Vector< Double > &parms) const =0
Poisson(RNG *gen, Double mean=0.0)
Construct a random number generator for a Poisson distribution.
LogNormal(RNG *gen, Double mean=1.0, Double variance=1.0)
Construct a random number generator for a log-normal distribution.
NegativeExpntl(RNG *gen, Double mean=1.0)
Construct a random number generator for a negative exponential distribution.
Double mean() const
Functions that allow you to query and change the parameters of the Poisson distribution.
An non-predefined random number distribution.
virtual ~NegativeExpntl()
The destructor is trivial.
2 parameters, mean and variance.
virtual ~Random()
A virtual destructor is needed to ensure that the destructor of derived classes gets used...
Base class for random number generators.
virtual Double operator()()
Returns a value from the log-normal distribution.
virtual void reset()
Resets the random number generator.
LatticeExprNode mean(const LatticeExprNode &expr)
virtual ~Weibull()
The destructor is trivial.
2 parameters, low and high.
Double mean() const
Functions that allow you to query and change the parameters of the negative exponential distribution...
virtual void reset()=0
Resets the random number generator.
Multiplicative linear congruential generator.
MLCG(Int seed1=0, Int seed2=1)
The constructor allows you to specify seeds.
virtual Vector< Double > parameters() const
String: the storage and methods of handling collections of characters.
virtual uInt asuInt()
Return the 32-random bits as an unsigned integer.
virtual ~LogNormal()
The destructor is trivial.
virtual ~Normal()
The destructor is trivial.
virtual Vector< Double > parameters() const =0
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameter (probability) described above through the base c...
uInt n() const
Functions that allow you to query and change the parameters of the binomial distribution.
LatticeExprNode variance(const LatticeExprNode &expr)
virtual Double mean() const
Functions that allow you to query and change the parameters of the log-normal distribution.
HyperGeometric(RNG *gen, Double mean=0.5, Double variance=1.0)
Construct a random number generator for an hypergeometric distribution.
virtual Vector< Double > parameters() const
virtual Double operator()()
Returns a value from the normal distribution.
virtual uInt asuInt()
Return the 32-random bits as an unsigned integer.
2 parameters, alpha and beta.
virtual ~Poisson()
The destructor is trivial.
virtual void setParameters(const Vector< Double > &parms)
These function allow you to manipulate the parameters (mean) described above through the base class...
Logarithmic normal distribution.
Double alpha() const
Functions that allow you to query and change the parameters of the Weiball distribution.
Double mean() const
Functions that allow you to query and change the parameters of the hypergeometric distribution...
virtual Double operator()()
Returns a value from the geometric uniform distribution.
virtual ~ACG()
The destructor cleans up memory allocated by this class.