A Discrete-Event Network Simulator
API
random-variable-stream.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2006 Georgia Tech Research Corporation
4  * Copyright (c) 2011 Mathieu Lacage
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Rajib Bhattacharjea<raj.b@gatech.edu>
20  * Hadi Arbabi<marbabi@cs.odu.edu>
21  * Mathieu Lacage <mathieu.lacage@gmail.com>
22  *
23  * Modified by Mitch Watrous <watrous@u.washington.edu>
24  *
25  */
26 #ifndef RANDOM_VARIABLE_STREAM_H
27 #define RANDOM_VARIABLE_STREAM_H
28 
29 #include "type-id.h"
30 #include "object.h"
31 #include "attribute-helper.h"
32 #include <stdint.h>
33 
40 namespace ns3 {
41 
72 class RngStream;
73 
98 {
99 public:
104  static TypeId GetTypeId (void);
112  virtual ~RandomVariableStream ();
113 
119  void SetStream (int64_t stream);
120 
126  int64_t GetStream (void) const;
127 
132  void SetAntithetic (bool isAntithetic);
133 
138  bool IsAntithetic (void) const;
139 
144  virtual double GetValue (void) = 0;
145 
150  virtual uint32_t GetInteger (void) = 0;
151 
152 protected:
157  RngStream * Peek (void) const;
158 
159 private:
180 
183 
186 
188  int64_t m_stream;
189 
190 }; // class RandomVariableStream
191 
192 
235 {
236 public:
241  static TypeId GetTypeId (void);
242 
247 
252  double GetMin (void) const;
253 
258  double GetMax (void) const;
259 
270  double GetValue (double min, double max);
271 
282  uint32_t GetInteger (uint32_t min, uint32_t max);
283 
284  // Inherited from RandomVariableStream
290  virtual double GetValue (void);
296  virtual uint32_t GetInteger (void);
297 
298 private:
300  double m_min;
301 
303  double m_max;
304 
305 }; // class UniformRandomVariable
306 
307 
319 {
320 public:
325  static TypeId GetTypeId (void);
326 
331 
336  double GetConstant (void) const;
337 
343  double GetValue (double constant);
349  uint32_t GetInteger (uint32_t constant);
350 
351  // Inherited from RandomVariableStream
352  /* \note This RNG always returns the same value. */
353  virtual double GetValue (void);
354  /* \note This RNG always returns the same value. */
355  virtual uint32_t GetInteger (void);
356 
357 private:
359  double m_constant;
360 
361 }; // class ConstantRandomVariable
362 
363 
400 {
401 public:
406  static TypeId GetTypeId (void);
407 
413 
418  double GetMin (void) const;
419 
425  double GetMax (void) const;
426 
432 
438  uint32_t GetConsecutive (void) const;
439 
440  // Inherited from RandomVariableStream
441  virtual double GetValue (void);
442  virtual uint32_t GetInteger (void);
443 
444 private:
446  double m_min;
447 
449  double m_max;
450 
453 
455  uint32_t m_consecutive;
456 
458  double m_current;
459 
462 
465 
466 }; // class SequentialRandomVariable
467 
468 
539 {
540 public:
545  static TypeId GetTypeId (void);
546 
552 
560  double GetMean (void) const;
561 
566  double GetBound (void) const;
567 
575  double GetValue (double mean, double bound);
576 
584  uint32_t GetInteger (uint32_t mean, uint32_t bound);
585 
586  // Inherited from RandomVariableStream
587  virtual double GetValue (void);
588  virtual uint32_t GetInteger (void);
589 
590 private:
592  double m_mean;
593 
595  double m_bound;
596 
597 }; // class ExponentialRandomVariable
598 
599 
641 {
642 public:
647  static TypeId GetTypeId (void);
648 
654 
659  double GetScale (void) const;
660 
665  double GetShape (void) const;
666 
671  double GetBound (void) const;
672 
699  double GetValue (double scale, double shape, double bound);
700 
727  uint32_t GetInteger (uint32_t scale, uint32_t shape, uint32_t bound);
728 
761  virtual double GetValue (void);
762 
786  virtual uint32_t GetInteger (void);
787 
788 private:
790  double m_mean;
791 
793  double m_scale;
794 
796  double m_shape;
797 
799  double m_bound;
800 
801 }; // class ParetoRandomVariable
802 
803 
858 {
859 public:
864  static TypeId GetTypeId (void);
865 
871 
876  double GetScale (void) const;
877 
882  double GetShape (void) const;
883 
888  double GetBound (void) const;
889 
915  double GetValue (double scale, double shape, double bound);
916 
942  uint32_t GetInteger (uint32_t scale, uint32_t shape, uint32_t bound);
943 
971  virtual double GetValue (void);
972 
995  virtual uint32_t GetInteger (void);
996 
997 private:
999  double m_scale;
1000 
1002  double m_shape;
1003 
1005  double m_bound;
1006 
1007 }; // class WeibullRandomVariable
1008 
1009 
1044 {
1045 public:
1047  static const double INFINITE_VALUE;
1048 
1053  static TypeId GetTypeId (void);
1054 
1060 
1065  double GetMean (void) const;
1066 
1071  double GetVariance (void) const;
1072 
1077  double GetBound (void) const;
1078 
1115  double GetValue (double mean, double variance, double bound = NormalRandomVariable::INFINITE_VALUE);
1116 
1153  uint32_t GetInteger (uint32_t mean, uint32_t variance, uint32_t bound);
1154 
1193  virtual double GetValue (void);
1194 
1228  virtual uint32_t GetInteger (void);
1229 
1230 private:
1232  double m_mean;
1233 
1235  double m_variance;
1236 
1238  double m_bound;
1239 
1242 
1244  double m_next;
1245 
1246 }; // class NormalRandomVariable
1247 
1248 
1293 {
1294 public:
1299  static TypeId GetTypeId (void);
1300 
1306 
1311  double GetMu (void) const;
1312 
1317  double GetSigma (void) const;
1318 
1352  double GetValue (double mu, double sigma);
1353 
1387  uint32_t GetInteger (uint32_t mu, uint32_t sigma);
1388 
1425  virtual double GetValue (void);
1426 
1458  virtual uint32_t GetInteger (void);
1459 
1460 private:
1462  double m_mu;
1463 
1465  double m_sigma;
1466 
1467 }; // class LogNormalRandomVariable
1468 
1469 
1502 {
1503 public:
1508  static TypeId GetTypeId (void);
1509 
1515 
1520  double GetAlpha (void) const;
1521 
1526  double GetBeta (void) const;
1527 
1541  double GetValue (double alpha, double beta);
1542 
1556  uint32_t GetInteger (uint32_t alpha, uint32_t beta);
1557 
1574  virtual double GetValue (void);
1575 
1587  virtual uint32_t GetInteger (void);
1588 
1589 private:
1626  double GetNormalValue (double mean, double variance, double bound);
1627 
1629  double m_alpha;
1630 
1632  double m_beta;
1633 
1636 
1638  double m_next;
1639 
1640 }; // class GammaRandomVariable
1641 
1642 
1679 {
1680 public:
1685  static TypeId GetTypeId (void);
1686 
1692 
1697  uint32_t GetK (void) const;
1698 
1703  double GetLambda (void) const;
1704 
1718  double GetValue (uint32_t k, double lambda);
1719 
1733  uint32_t GetInteger (uint32_t k, uint32_t lambda);
1734 
1751  virtual double GetValue (void);
1752 
1764  virtual uint32_t GetInteger (void);
1765 
1766 private:
1791  double GetExponentialValue (double mean, double bound);
1792 
1794  uint32_t m_k;
1795 
1797  double m_lambda;
1798 
1799 }; // class ErlangRandomVariable
1800 
1801 
1831 {
1832 public:
1837  static TypeId GetTypeId (void);
1838 
1844 
1849  double GetMean (void) const;
1850 
1855  double GetMin (void) const;
1856 
1861  double GetMax (void) const;
1862 
1901  double GetValue (double mean, double min, double max);
1902 
1941  uint32_t GetInteger (uint32_t mean, uint32_t min, uint32_t max);
1942 
1983  virtual double GetValue (void);
1984 
2020  virtual uint32_t GetInteger (void);
2021 
2022 private:
2024  double m_mean;
2025 
2027  double m_min;
2028 
2030  double m_max;
2031 
2032 }; // class TriangularRandomVariable
2033 
2034 
2094 {
2095 public:
2100  static TypeId GetTypeId (void);
2101 
2106  ZipfRandomVariable ();
2107 
2112  uint32_t GetN (void) const;
2113 
2118  double GetAlpha (void) const;
2119 
2133  double GetValue (uint32_t n, double alpha);
2134 
2148  uint32_t GetInteger (uint32_t n, uint32_t alpha);
2149 
2166  virtual double GetValue (void);
2167 
2179  virtual uint32_t GetInteger (void);
2180 
2181 private:
2183  uint32_t m_n;
2184 
2186  double m_alpha;
2187 
2189  double m_c;
2190 
2191 }; // class ZipfRandomVariable
2192 
2193 
2234 {
2235 public:
2240  static TypeId GetTypeId (void);
2241 
2246  ZetaRandomVariable ();
2247 
2252  double GetAlpha (void) const;
2253 
2266  double GetValue (double alpha);
2267 
2280  uint32_t GetInteger (uint32_t alpha);
2281 
2298  virtual double GetValue (void);
2299 
2311  virtual uint32_t GetInteger (void);
2312 
2313 private:
2315  double m_alpha;
2316 
2318  double m_b;
2319 
2320 }; // class ZetaRandomVariable
2321 
2322 
2354 {
2355 public:
2360  static TypeId GetTypeId (void);
2361 
2367  virtual ~DeterministicRandomVariable ();
2368 
2377  void SetValueArray (double* values, std::size_t length);
2378 
2383  virtual double GetValue (void);
2384 
2389  virtual uint32_t GetInteger (void);
2390 
2391 private:
2393  std::size_t m_count;
2394 
2396  std::size_t m_next;
2397 
2399  double* m_data;
2400 
2401 }; // class DeterministicRandomVariable
2402 
2403 
2481 {
2482 public:
2487  static TypeId GetTypeId (void);
2488 
2493  EmpiricalRandomVariable (void);
2494 
2502  void CDF (double v, double c); // Value, prob <= Value
2503 
2518  virtual double GetValue (void);
2519 
2533  virtual uint32_t GetInteger (void);
2534 
2541  virtual double Interpolate (void);
2542 
2549  bool SetInterpolate (bool interpolate);
2550 
2551 private:
2553  class ValueCDF
2554  {
2555  public:
2557  ValueCDF (void);
2564  ValueCDF (double v, double c);
2565 
2567  double value;
2569  double cdf;
2570  }; // class ValueCDF
2571 
2582  void Validate (void);
2596  bool PreSample (double & value);
2602  double DoSampleCDF (double r);
2610  double DoInterpolate (double r);
2611 
2618  friend
2619  bool operator < (ValueCDF a, ValueCDF b);
2620 
2624  std::vector<ValueCDF> m_emp;
2630 
2631 }; // class EmpiricalRandomVariable
2632 
2633 
2634 } // namespace ns3
2635 
2636 #endif /* RANDOM_VARIABLE_STREAM_H */
The Random Number Generator (RNG) that returns a predetermined sequence.
double m_scale
The scale parameter for the Weibull distribution returned by this RNG stream.
double m_current
The current sequence value.
ExponentialRandomVariable()
Creates an exponential distribution RNG with the default values for the mean and upper bound...
std::vector< ValueCDF > m_emp
The vector of CDF points.
double GetBound(void) const
Get the configured upper bound of this RNG.
double GetAlpha(void) const
Returns the alpha value for the Zipf distribution returned by this RNG stream.
double m_next
The algorithm produces two values at a time.
double GetMax(void) const
Get the upper bound on values returned by GetValue(void).
void SetAntithetic(bool isAntithetic)
Specify whether antithetic values should be generated.
NormalRandomVariable()
Creates a normal distribution RNG with the default values for the mean, variance, and bound...
virtual double GetValue(void)
Returns the next value in the empirical distribution.
void SetStream(int64_t stream)
Specifies the stream number for the RngStream.
WeibullRandomVariable()
Creates a Weibull distribution RNG with the default values for the scale, shape, and upper bound...
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a Weibull distribution with the current scale, shape, and upper bound.
double GetMin(void) const
Get the first value of the sequence.
virtual double GetValue(void)
Get the next random value as a double drawn from the distribution.
bool m_validated
true once the CDF has been validated.
double m_alpha
The alpha value for the Zipf distribution returned by this RNG stream.
double m_mean
The mean value for the triangular distribution returned by this RNG stream.
SequentialRandomVariable()
Creates a sequential RNG with the default values for the sequence parameters.
double m_bound
The upper bound on values that can be returned by this RNG stream.
static TypeId GetTypeId(void)
Register this type.
double GetMean(void) const
Returns the mean value for the triangular distribution returned by this RNG stream.
The exponential distribution Random Number Generator (RNG).
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a triangular distribution with the current mean...
The Random Number Generator (RNG) that returns a pattern of sequential values.
RandomVariableStream()
Default constructor.
double GetMax(void) const
Returns the upper bound on values that can be returned by this RNG stream.
The normal (Gaussian) distribution Random Number Generator (RNG) that allows stream numbers to be set...
std::size_t m_count
Size of the array of values.
double GetExponentialValue(double mean, double bound)
Returns a random double from an exponential distribution with the specified mean and upper bound...
double m_mean
The mean parameter for the Pareto distribution returned by this RNG stream.
double DoInterpolate(double r)
Linear interpolation between two points on the CDF to estimate the value at r.
virtual double GetValue(void)
Returns a random double from a normal distribution with the current mean, variance, and bound.
double m_min
The lower bound on values that can be returned by this RNG stream.
static TypeId GetTypeId(void)
Register this type.
double m_shape
The shape parameter for the Weibull distribution returned by this RNG stream.
int64_t m_stream
The stream number for the RngStream.
double GetShape(void) const
Returns the shape parameter for the Weibull distribution returned by this RNG stream.
double m_constant
The constant value returned by this RNG stream.
double m_min
The first value of the sequence.
Ptr< RandomVariableStream > m_increment
Increment between distinct values.
bool m_nextValid
True if the next value is valid.
virtual double GetValue(void)=0
Get the next random value as a double drawn from the distribution.
void SetValueArray(double *values, std::size_t length)
Sets the array of values that holds the predetermined sequence.
double GetLambda(void) const
Returns the lambda value for the Erlang distribution returned by this RNG stream. ...
static TypeId GetTypeId(void)
Register this type.
static TypeId GetTypeId(void)
Register this type.
double m_bound
The upper bound on values that can be returned by this RNG stream.
DeterministicRandomVariable()
Creates a deterministic RNG that will have a predetermined sequence of values.
static TypeId GetTypeId(void)
Register this type.
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a gamma distribution with the current alpha and beta...
double m_shape
The shape parameter for the Pareto distribution returned by this RNG stream.
uint32_t m_n
The n value for the Zipf distribution returned by this RNG stream.
virtual double GetValue(void)
Get the next random value as a double drawn from the distribution.
RngStream * m_rng
Pointer to the underlying RngStream.
Combined Multiple-Recursive Generator MRG32k3a.
Definition: rng-stream.h:49
double * m_data
Array of values to return in sequence.
virtual uint32_t GetInteger(void)=0
Get the next random value as an integer drawn from the distribution.
virtual uint32_t GetInteger(void)
Get the next random value as an integer drawn from the distribution.
double GetMin(void) const
Get the lower bound on randoms returned by GetValue(void).
EmpiricalRandomVariable(void)
Creates an empirical RNG that has a specified, empirical distribution, and configured for interpolati...
double m_lambda
The lambda value for the Erlang distribution returned by this RNG stream.
Ptr< RandomVariableStream > GetIncrement(void) const
Get the increment for the sequence.
double m_alpha
The alpha value for the zeta distribution returned by this RNG stream.
virtual double GetValue(void)
Returns the next value in the sequence.
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a Pareto distribution with the current mean, shape, and upper bound.
LogNormalRandomVariable()
Creates a log-normal distribution RNG with the default values for mu and sigma.
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a log-normal distribution with the current mu and sigma...
double m_max
Strict upper bound on the sequence.
ZetaRandomVariable()
Creates a zeta distribution RNG with the default value for alpha.
uint32_t m_k
The k value for the Erlang distribution returned by this RNG stream.
The gamma distribution Random Number Generator (RNG) that allows stream numbers to be set determinist...
static TypeId GetTypeId(void)
Register this type.
virtual double GetValue(void)
Returns a random double from a triangular distribution with the current mean, min, and max.
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a Zipf distribution with the current n and alpha...
void CDF(double v, double c)
Specifies a point in the empirical distribution.
double GetBeta(void) const
Returns the beta value for the gamma distribution returned by this RNG stream.
Helper to hold one point of the CDF.
virtual uint32_t GetInteger(void)
Get the next random value as an integer drawn from the distribution.
double m_sigma
The sigma value for the log-normal distribution returned by this RNG stream.
static TypeId GetTypeId(void)
Register this type.
ZipfRandomVariable()
Creates a Zipf distribution RNG with the default values for n and alpha.
bool PreSample(double &value)
Do the initial rng draw and check against the extrema.
The uniform distribution Random Number Generator (RNG).
static TypeId GetTypeId(void)
Register this type.
static TypeId GetTypeId(void)
Register this type.
GammaRandomVariable()
Creates a gamma distribution RNG with the default values for alpha and beta.
double m_scale
The scale parameter for the Pareto distribution returned by this RNG stream.
static TypeId GetTypeId(void)
Register this type.
double GetAlpha(void) const
Returns the alpha value for the gamma distribution returned by this RNG stream.
double m_c
The normalization constant.
uint32_t m_consecutive
The number of times each distinct value is repeated.
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a normal distribution with the current mean, variance, and bound.
double m_variance
The variance value for the normal distribution returned by this RNG stream.
static TypeId GetTypeId(void)
Register this type.
bool SetInterpolate(bool interpolate)
Switch the mode between sampling the CDF and interpolating.
double m_mean
The mean value of the unbounded exponential distribution.
int64_t GetStream(void) const
Returns the stream number for the RngStream.
friend bool operator<(ValueCDF a, ValueCDF b)
Comparison operator, for use by std::upper_bound.
double GetScale(void) const
Returns the scale parameter for the Pareto distribution returned by this RNG stream.
double GetScale(void) const
Returns the scale parameter for the Weibull distribution returned by this RNG stream.
virtual double GetValue(void)
Returns a random double from a Zipf distribution with the current n and alpha.
virtual double GetValue(void)
Get the next random value as a double drawn from the distribution.
bool m_isCurrentSet
Indicates if the current sequence value has been properly initialized.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual double GetValue(void)
Returns a random double from an Erlang distribution with the current k and lambda.
double GetMean(void) const
Returns the mean value for the normal distribution returned by this RNG stream.
double m_mean
The mean value for the normal distribution returned by this RNG stream.
static const double INFINITE_VALUE
Large constant to bound the range.
double m_max
The upper bound on values that can be returned by this RNG stream.
static TypeId GetTypeId(void)
Register this type.
uint32_t m_currentConsecutive
The number of times the current distinct value has been repeated.
ns3::TypeId declaration; inline and template implementations.
virtual uint32_t GetInteger(void)
Get the next random value as an integer drawn from the distribution.
static TypeId GetTypeId(void)
Register this type.
double m_bound
The upper bound on values that can be returned by this RNG stream.
double m_beta
The beta value for the gamma distribution returned by this RNG stream.
double GetMin(void) const
Returns the lower bound for the triangular distribution returned by this RNG stream.
double GetAlpha(void) const
Returns the alpha value for the zeta distribution returned by this RNG stream.
virtual double GetValue(void)
Returns a random double from a Weibull distribution with the current scale, shape, and upper bound.
double m_alpha
The alpha value for the gamma distribution returned by this RNG stream.
double GetBound(void) const
Returns the upper bound on values that can be returned by this RNG stream.
bool IsAntithetic(void) const
Check if antithetic values will be generated.
virtual uint32_t GetInteger(void)
Returns the next value in the sequence.
double GetConstant(void) const
Get the constant value returned by this RNG stream.
double GetNormalValue(double mean, double variance, double bound)
Returns a random double from a normal distribution with the specified mean, variance, and bound.
double GetBound(void) const
Returns the bound on values that can be returned by this RNG stream.
Attribute helper (ATTRIBUTE_ )macros definition.
virtual double GetValue(void)
Returns a random double from a log-normal distribution with the current mu and sigma.
double max(double x, double y)
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.
uint32_t GetConsecutive(void) const
Get the number of times each distinct value of the sequence is repeated before incrementing to the ne...
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from a zeta distribution with the current alpha.
ParetoRandomVariable()
Creates a Pareto distribution RNG with the default values for the mean, the shape, and upper bound.
The Zipf distribution Random Number Generator (RNG) that allows stream numbers to be set deterministi...
The basic uniform Random Number Generator (RNG).
virtual uint32_t GetInteger(void)
Get the next random value as an integer drawn from the distribution.
virtual double GetValue(void)
Returns a random double from a zeta distribution with the current alpha.
virtual uint32_t GetInteger(void)
Returns the next value in the empirical distribution.
double m_bound
The bound on values that can be returned by this RNG stream.
virtual uint32_t GetInteger(void)
Returns a random unsigned integer from an Erlang distribution with the current k and lambda...
virtual ~RandomVariableStream()
Destructor.
double GetMax(void) const
Get the limit of the sequence, which is (at least) one more than the last value of the sequence...
double m_next
The algorithm produces two normal values at a time.
double GetVariance(void) const
Returns the variance value for the normal distribution returned by this RNG stream.
double m_b
Just for calculus simplifications.
UniformRandomVariable()
Creates a uniform distribution RNG with the default range.
double min(double x, double y)
double DoSampleCDF(double r)
Sample the CDF as a histogram (without interpolation).
The triangular distribution Random Number Generator (RNG) that allows stream numbers to be set determ...
static TypeId GetTypeId(void)
Register this type.
double m_max
The upper bound on values that can be returned by this RNG stream.
static TypeId GetTypeId(void)
Register this type.
ErlangRandomVariable()
Creates an Erlang distribution RNG with the default values for k and lambda.
bool m_nextValid
True if the next normal value is valid.
virtual double Interpolate(void)
Returns the next value in the empirical distribution using linear interpolation.
The Erlang distribution Random Number Generator (RNG) that allows stream numbers to be set determinis...
uint32_t GetN(void) const
Returns the n value for the Zipf distribution returned by this RNG stream.
A base class which provides memory management and object aggregation.
Definition: object.h:87
virtual double GetValue(void)
Returns a random double from a Pareto distribution with the current mean, shape, and upper bound...
double GetMean(void) const
Get the configured mean value of this RNG.
The Random Number Generator (RNG) that has a specified empirical distribution.
uint32_t GetK(void) const
Returns the k value for the Erlang distribution returned by this RNG stream.
virtual double GetValue(void)
Get the next random value as a double drawn from the distribution.
std::size_t m_next
Position of the next value in the array of values.
double GetMu(void) const
Returns the mu value for the log-normal distribution returned by this RNG stream. ...
virtual double GetValue(void)
Returns a random double from a gamma distribution with the current alpha and beta.
The log-normal distribution Random Number Generator (RNG) that allows stream numbers to be set determ...
a unique identifier for an interface.
Definition: type-id.h:58
TriangularRandomVariable()
Creates a triangular distribution RNG with the default values for the mean, lower bound...
ConstantRandomVariable()
Creates a constant RNG with the default constant value.
The Pareto distribution Random Number Generator (RNG).
static TypeId GetTypeId(void)
Register this type.
double m_mu
The mu value for the log-normal distribution returned by this RNG stream.
void Validate(void)
Check that the CDF is valid.
double GetSigma(void) const
Returns the sigma value for the log-normal distribution returned by this RNG stream.
bool m_interpolate
If true GetValue will interpolate, otherwise treat CDF as normal histogram.
double m_min
The lower bound on values that can be returned by this RNG stream.
RandomVariableStream & operator=(const RandomVariableStream &o)
Assignment operator.
The Random Number Generator (RNG) that returns a constant.
The Weibull distribution Random Number Generator (RNG) that allows stream numbers to be set determini...
The zeta distribution Random Number Generator (RNG) that allows stream numbers to be set deterministi...
double GetShape(void) const
Returns the shape parameter for the Pareto distribution returned by this RNG stream.
RngStream * Peek(void) const
Get the pointer to the underlying RngStream.
double GetBound(void) const
Returns the upper bound on values that can be returned by this RNG stream.
bool m_isAntithetic
Indicates if antithetic values should be generated by this RNG stream.