View | Details | Raw Unified | Return to bug 2513
Collapse All | Expand All

(-)a/src/core/examples/main-random-variable-stream.cc (-9 / +9 lines)
 Lines 138-162    Link Here 
138
    plot.AppendExtra ("set xrange [0:2]");
138
    plot.AppendExtra ("set xrange [0:2]");
139
139
140
    Ptr<ParetoRandomVariable> x1 = CreateObject<ParetoRandomVariable> ();
140
    Ptr<ParetoRandomVariable> x1 = CreateObject<ParetoRandomVariable> ();
141
    x1->SetAttribute ("Mean", DoubleValue (1.0));
141
    x1->SetAttribute ("Scale", DoubleValue (1.0));
142
    x1->SetAttribute ("Shape", DoubleValue (1.5));
142
    x1->SetAttribute ("Shape", DoubleValue (1.5));
143
143
144
    plot.AddDataset ( Histogramm (x1, probes, precision,
144
    plot.AddDataset ( Histogramm (x1, probes, precision,
145
                                  "ParetoRandomVariable m=1.0 s=1.5") );
145
                                  "ParetoRandomVariable scale=1.0 shape=1.5") );
146
146
147
    Ptr<ParetoRandomVariable> x2 = CreateObject<ParetoRandomVariable> ();
147
    Ptr<ParetoRandomVariable> x2 = CreateObject<ParetoRandomVariable> ();
148
    x2->SetAttribute ("Mean", DoubleValue (1.0));
148
    x2->SetAttribute ("Scale", DoubleValue (1.0));
149
    x2->SetAttribute ("Shape", DoubleValue (2.0));
149
    x2->SetAttribute ("Shape", DoubleValue (2.0));
150
150
151
    plot.AddDataset ( Histogramm (x2, probes, precision,
151
    plot.AddDataset ( Histogramm (x2, probes, precision,
152
                                  "ParetoRandomVariable m=1.0 s=2.0") );
152
                                  "ParetoRandomVariable scale=1.0 shape=2.0") );
153
153
154
    Ptr<ParetoRandomVariable> x3 = CreateObject<ParetoRandomVariable> ();
154
    Ptr<ParetoRandomVariable> x3 = CreateObject<ParetoRandomVariable> ();
155
    x3->SetAttribute ("Mean", DoubleValue (1.0));
155
    x3->SetAttribute ("Scale", DoubleValue (1.0));
156
    x3->SetAttribute ("Shape", DoubleValue (2.5));
156
    x3->SetAttribute ("Shape", DoubleValue (2.5));
157
157
158
    plot.AddDataset ( Histogramm (x3, probes, precision,
158
    plot.AddDataset ( Histogramm (x3, probes, precision,
159
                                  "ParetoRandomVariable m=1.0 s=2.5") );
159
                                  "ParetoRandomVariable scale=1.0 shape=2.5") );
160
160
161
    gnuplots.AddPlot (plot);
161
    gnuplots.AddPlot (plot);
162
  }
162
  }
 Lines 171-191    Link Here 
171
    x1->SetAttribute ("Shape", DoubleValue (1.0));
171
    x1->SetAttribute ("Shape", DoubleValue (1.0));
172
172
173
    plot.AddDataset ( Histogramm (x1, probes, precision,
173
    plot.AddDataset ( Histogramm (x1, probes, precision,
174
                                  "WeibullRandomVariable m=1.0 s=1.0") );
174
                                  "WeibullRandomVariable scale=1.0 shape=1.0") );
175
175
176
    Ptr<WeibullRandomVariable> x2 = CreateObject<WeibullRandomVariable> ();
176
    Ptr<WeibullRandomVariable> x2 = CreateObject<WeibullRandomVariable> ();
177
    x2->SetAttribute ("Scale", DoubleValue (1.0));
177
    x2->SetAttribute ("Scale", DoubleValue (1.0));
178
    x2->SetAttribute ("Shape", DoubleValue (2.0));
178
    x2->SetAttribute ("Shape", DoubleValue (2.0));
179
179
180
    plot.AddDataset ( Histogramm (x2, probes, precision,
180
    plot.AddDataset ( Histogramm (x2, probes, precision,
181
                                  "WeibullRandomVariable m=1.0 s=2.0") );
181
                                  "WeibullRandomVariable scale=1.0 shape=2.0") );
182
182
183
    Ptr<WeibullRandomVariable> x3 = CreateObject<WeibullRandomVariable> ();
183
    Ptr<WeibullRandomVariable> x3 = CreateObject<WeibullRandomVariable> ();
184
    x3->SetAttribute ("Scale", DoubleValue (1.0));
184
    x3->SetAttribute ("Scale", DoubleValue (1.0));
185
    x3->SetAttribute ("Shape", DoubleValue (3.0));
185
    x3->SetAttribute ("Shape", DoubleValue (3.0));
186
186
187
    plot.AddDataset ( Histogramm (x3, probes, precision,
187
    plot.AddDataset ( Histogramm (x3, probes, precision,
188
                                  "WeibullRandomVariable m=1.0 s=3.0") );
188
                                  "WeibullRandomVariable scale=1.0 shape=3.0") );
189
189
190
    gnuplots.AddPlot (plot);
190
    gnuplots.AddPlot (plot);
191
  }
191
  }
(-)a/src/core/examples/main-random-variable.cc (-9 / +9 lines)
 Lines 138-162    Link Here 
138
    plot.AppendExtra ("set xrange [0:2]");
138
    plot.AppendExtra ("set xrange [0:2]");
139
139
140
    Ptr<ParetoRandomVariable> x1 = CreateObject<ParetoRandomVariable> ();
140
    Ptr<ParetoRandomVariable> x1 = CreateObject<ParetoRandomVariable> ();
141
    x1->SetAttribute ("Mean", DoubleValue (1.0));
141
    x1->SetAttribute ("Scale", DoubleValue (1.0));
142
    x1->SetAttribute ("Shape", DoubleValue (1.5));
142
    x1->SetAttribute ("Shape", DoubleValue (1.5));
143
143
144
    plot.AddDataset ( Histogramm (x1, probes, precision,
144
    plot.AddDataset ( Histogramm (x1, probes, precision,
145
                                  "ParetoRandomVariable m=1.0 s=1.5") );
145
                                  "ParetoRandomVariable scale=1.0 shape=1.5") );
146
146
147
    Ptr<ParetoRandomVariable> x2 = CreateObject<ParetoRandomVariable> ();
147
    Ptr<ParetoRandomVariable> x2 = CreateObject<ParetoRandomVariable> ();
148
    x2->SetAttribute ("Mean", DoubleValue (1.0));
148
    x2->SetAttribute ("Scale", DoubleValue (1.0));
149
    x2->SetAttribute ("Shape", DoubleValue (2.0));
149
    x2->SetAttribute ("Shape", DoubleValue (2.0));
150
150
151
    plot.AddDataset ( Histogramm (x2, probes, precision,
151
    plot.AddDataset ( Histogramm (x2, probes, precision,
152
                                  "ParetoRandomVariable m=1.0 s=2.0") );
152
                                  "ParetoRandomVariable scale=1.0 shape=2.0") );
153
153
154
    Ptr<ParetoRandomVariable> x3 = CreateObject<ParetoRandomVariable> ();
154
    Ptr<ParetoRandomVariable> x3 = CreateObject<ParetoRandomVariable> ();
155
    x3->SetAttribute ("Mean", DoubleValue (1.0));
155
    x3->SetAttribute ("Scale", DoubleValue (1.0));
156
    x3->SetAttribute ("Shape", DoubleValue (2.5));
156
    x3->SetAttribute ("Shape", DoubleValue (2.5));
157
157
158
    plot.AddDataset ( Histogramm (x3, probes, precision,
158
    plot.AddDataset ( Histogramm (x3, probes, precision,
159
                                  "ParetoRandomVariable m=1.0 s=2.5") );
159
                                  "ParetoRandomVariable scale=1.0 shape=2.5") );
160
160
161
    gnuplots.AddPlot (plot);
161
    gnuplots.AddPlot (plot);
162
  }
162
  }
 Lines 171-191    Link Here 
171
    x1->SetAttribute ("Shape", DoubleValue (1.0));
171
    x1->SetAttribute ("Shape", DoubleValue (1.0));
172
172
173
    plot.AddDataset ( Histogramm (x1, probes, precision,
173
    plot.AddDataset ( Histogramm (x1, probes, precision,
174
                                  "WeibullRandomVariable m=1.0 s=1.0") );
174
                                  "WeibullRandomVariable scale=1.0 shape=1.0") );
175
175
176
    Ptr<WeibullRandomVariable> x2 = CreateObject<WeibullRandomVariable> ();
176
    Ptr<WeibullRandomVariable> x2 = CreateObject<WeibullRandomVariable> ();
177
    x2->SetAttribute ("Scale", DoubleValue (1.0));
177
    x2->SetAttribute ("Scale", DoubleValue (1.0));
178
    x2->SetAttribute ("Shape", DoubleValue (2.0));
178
    x2->SetAttribute ("Shape", DoubleValue (2.0));
179
179
180
    plot.AddDataset ( Histogramm (x2, probes, precision,
180
    plot.AddDataset ( Histogramm (x2, probes, precision,
181
                                  "WeibullRandomVariable m=1.0 s=2.0") );
181
                                  "WeibullRandomVariable scale=1.0 shape=2.0") );
182
182
183
    Ptr<WeibullRandomVariable> x3 = CreateObject<WeibullRandomVariable> ();
183
    Ptr<WeibullRandomVariable> x3 = CreateObject<WeibullRandomVariable> ();
184
    x3->SetAttribute ("Scale", DoubleValue (1.0));
184
    x3->SetAttribute ("Scale", DoubleValue (1.0));
185
    x3->SetAttribute ("Shape", DoubleValue (3.0));
185
    x3->SetAttribute ("Shape", DoubleValue (3.0));
186
186
187
    plot.AddDataset ( Histogramm (x3, probes, precision,
187
    plot.AddDataset ( Histogramm (x3, probes, precision,
188
                                  "WeibullRandomVariable m=1.0 s=3.0") );
188
                                  "WeibullRandomVariable scale=1.0 shape=3.0") );
189
189
190
    gnuplots.AddPlot (plot);
190
    gnuplots.AddPlot (plot);
191
  }
191
  }
(-)a/src/core/model/random-variable-stream.cc (-8 / +25 lines)
 Lines 33-38    Link Here 
33
#include "log.h"
33
#include "log.h"
34
#include "rng-stream.h"
34
#include "rng-stream.h"
35
#include "rng-seed-manager.h"
35
#include "rng-seed-manager.h"
36
#include "unused.h"
36
#include <cmath>
37
#include <cmath>
37
#include <iostream>
38
#include <iostream>
38
39
 Lines 455-463    Link Here 
455
    .SetGroupName ("Core")
456
    .SetGroupName ("Core")
456
    .AddConstructor<ParetoRandomVariable> ()
457
    .AddConstructor<ParetoRandomVariable> ()
457
    .AddAttribute("Mean", "The mean parameter for the Pareto distribution returned by this RNG stream.",
458
    .AddAttribute("Mean", "The mean parameter for the Pareto distribution returned by this RNG stream.",
458
		  DoubleValue(1.0),
459
      DoubleValue(0.0),
459
		  MakeDoubleAccessor(&ParetoRandomVariable::m_mean),
460
      MakeDoubleAccessor(&ParetoRandomVariable::m_mean),
460
		  MakeDoubleChecker<double>())
461
      MakeDoubleChecker<double>(),
462
      TypeId::DEPRECATED,
463
      "Not anymore used. Use 'Scale' instead.")
464
    .AddAttribute("Scale", "The scale parameter for the Pareto distribution returned by this RNG stream.",
465
      DoubleValue(1.0),
466
      MakeDoubleAccessor(&ParetoRandomVariable::m_scale),
467
      MakeDoubleChecker<double>())
461
    .AddAttribute("Shape", "The shape parameter for the Pareto distribution returned by this RNG stream.",
468
    .AddAttribute("Shape", "The shape parameter for the Pareto distribution returned by this RNG stream.",
462
		  DoubleValue(2.0),
469
		  DoubleValue(2.0),
463
		  MakeDoubleAccessor(&ParetoRandomVariable::m_shape),
470
		  MakeDoubleAccessor(&ParetoRandomVariable::m_shape),
 Lines 471-493    Link Here 
471
}
478
}
472
ParetoRandomVariable::ParetoRandomVariable ()
479
ParetoRandomVariable::ParetoRandomVariable ()
473
{
480
{
474
  // m_mean, m_shape, and m_bound are initialized after constructor
481
  // m_shape, m_shape, and m_bound are initialized after constructor
475
  // by attributes
482
  // by attributes
476
  NS_LOG_FUNCTION (this);
483
  NS_LOG_FUNCTION (this);
484
  NS_UNUSED (m_mean);
477
}
485
}
478
486
479
double 
487
double 
480
ParetoRandomVariable::GetMean (void) const
488
ParetoRandomVariable::GetMean (void) const
481
{
489
{
482
  NS_LOG_FUNCTION (this);
490
  NS_LOG_FUNCTION (this);
483
  return m_mean;
491
492
  double mean = std::numeric_limits<double>::infinity();
493
494
  if (m_shape > 1)
495
    {
496
      mean = m_shape * m_scale / (m_shape -1);
497
    }
498
499
  return mean;
484
}
500
}
501
485
double 
502
double 
486
ParetoRandomVariable::GetShape (void) const
503
ParetoRandomVariable::GetShape (void) const
487
{
504
{
488
  NS_LOG_FUNCTION (this);
505
  NS_LOG_FUNCTION (this);
489
  return m_shape;
506
  return m_shape;
490
}
507
}
508
491
double 
509
double 
492
ParetoRandomVariable::GetBound (void) const
510
ParetoRandomVariable::GetBound (void) const
493
{
511
{
 Lines 496-506    Link Here 
496
}
514
}
497
515
498
double 
516
double 
499
ParetoRandomVariable::GetValue (double mean, double shape, double bound)
517
ParetoRandomVariable::GetValue (double scale, double shape, double bound)
500
{
518
{
501
  // Calculate the scale parameter.
519
  // Calculate the scale parameter.
502
  NS_LOG_FUNCTION (this << mean << shape << bound);
520
  NS_LOG_FUNCTION (this << scale << shape << bound);
503
  double scale = mean * (shape - 1.0) / shape;
504
521
505
  while (1)
522
  while (1)
506
    {
523
    {
(-)a/src/core/model/random-variable-stream.h (-43 / +33 lines)
 Lines 607-615    Link Here 
607
 * The probability density function of a Pareto variable is defined
607
 * The probability density function of a Pareto variable is defined
608
 * over the range [\f$x_m\f$,\f$+\infty\f$) as: \f$ k \frac{x_m^k}{x^{k+1}}\f$
608
 * over the range [\f$x_m\f$,\f$+\infty\f$) as: \f$ k \frac{x_m^k}{x^{k+1}}\f$
609
 * where \f$x_m > 0\f$ is called the scale parameter and \f$ k > 0\f$
609
 * where \f$x_m > 0\f$ is called the scale parameter and \f$ k > 0\f$
610
 * is called the pareto index or shape.
610
 * is called the Pareto index or shape.
611
 *
611
 *
612
 * The parameter \f$ x_m \f$ can be infered from the mean and the parameter \f$ k \f$
612
 * The parameter \f$ x_m \f$ can be inferred from the mean and the parameter \f$ k \f$
613
 * with the equation \f$ x_m = mean \frac{k-1}{k},  k > 1\f$.
613
 * with the equation \f$ x_m = mean \frac{k-1}{k},  k > 1\f$.
614
 *
614
 *
615
 * Since Pareto distributions can theoretically return unbounded values,
615
 * Since Pareto distributions can theoretically return unbounded values,
 Lines 619-629    Link Here 
619
 *
619
 *
620
 * Here is an example of how to use this class:
620
 * Here is an example of how to use this class:
621
 * \code
621
 * \code
622
 *   double mean = 5.0;
622
 *   double scale = 5.0;
623
 *   double shape = 2.0;
623
 *   double shape = 2.0;
624
 * 
624
 * 
625
 *   Ptr<ParetoRandomVariable> x = CreateObject<ParetoRandomVariable> ();
625
 *   Ptr<ParetoRandomVariable> x = CreateObject<ParetoRandomVariable> ();
626
 *   x->SetAttribute ("Mean", DoubleValue (mean));
626
 *   x->SetAttribute ("Scale", DoubleValue (scale));
627
 *   x->SetAttribute ("Shape", DoubleValue (shape));
627
 *   x->SetAttribute ("Shape", DoubleValue (shape));
628
 * 
628
 * 
629
 *   // The expected value for the mean of the values returned by a
629
 *   // The expected value for the mean of the values returned by a
 Lines 632-642    Link Here 
632
 *   //                   shape * scale
632
 *   //                   shape * scale
633
 *   //     E[value]  =  ---------------  ,
633
 *   //     E[value]  =  ---------------  ,
634
 *   //                     shape - 1
634
 *   //                     shape - 1
635
 *   // 
635
 *
636
 *   // where
637
 *   // 
638
 *   //     scale  =  mean * (shape - 1.0) / shape .
639
 *   //
640
 *   double value = x->GetValue ();
636
 *   double value = x->GetValue ();
641
 * \endcode
637
 * \endcode
642
 */
638
 */
 Lines 659-667    Link Here 
659
   * \brief Returns the mean parameter for the Pareto distribution returned by this RNG stream.
655
   * \brief Returns the mean parameter for the Pareto distribution returned by this RNG stream.
660
   * \return The mean parameter for the Pareto distribution returned by this RNG stream.
656
   * \return The mean parameter for the Pareto distribution returned by this RNG stream.
661
   */
657
   */
658
  NS_DEPRECATED
662
  double GetMean (void) const;
659
  double GetMean (void) const;
663
660
664
  /**
661
  /**
662
   * \brief Returns the scale parameter for the Pareto distribution returned by this RNG stream.
663
   * \return The scale parameter for the Pareto distribution returned by this RNG stream.
664
   */
665
  double GetScale (void) const;
666
667
  /**
665
   * \brief Returns the shape parameter for the Pareto distribution returned by this RNG stream.
668
   * \brief Returns the shape parameter for the Pareto distribution returned by this RNG stream.
666
   * \return The shape parameter for the Pareto distribution returned by this RNG stream.
669
   * \return The shape parameter for the Pareto distribution returned by this RNG stream.
667
   */
670
   */
 Lines 674-681    Link Here 
674
  double GetBound (void) const;
677
  double GetBound (void) const;
675
678
676
  /**
679
  /**
677
   * \brief Returns a random double from a Pareto distribution with the specified mean, shape, and upper bound.
680
   * \brief Returns a random double from a Pareto distribution with the specified scale, shape, and upper bound.
678
   * \param [in] mean Mean parameter for the Pareto distribution.
681
   * \param [in] scale Mean parameter for the Pareto distribution.
679
   * \param [in] shape Shape parameter for the Pareto distribution.
682
   * \param [in] shape Shape parameter for the Pareto distribution.
680
   * \param [in] bound Upper bound on values returned.
683
   * \param [in] bound Upper bound on values returned.
681
   * \return A floating point random value.
684
   * \return A floating point random value.
 Lines 688-714    Link Here 
688
   *         x = \frac{scale}{u^{\frac{1}{shape}}}
691
   *         x = \frac{scale}{u^{\frac{1}{shape}}}
689
   *    \f]
692
   *    \f]
690
   *
693
   *
691
   * is a value that would be returned normally, where
694
   * is a value that would be returned normally.
692
   *     
693
   *    \f[
694
   *         scale  =  mean * (shape - 1.0) / shape  .
695
   *    \f]
696
   *    
695
   *    
697
   * Then \f$(1 - u\f$) is the distance that \f$u\f$ would be from
696
   * The value returned in the antithetic case, \f$x'\f$, is
698
   * \f$1\f$.  The value returned in the antithetic case, \f$x'\f$, is
699
   * calculated as
697
   * calculated as
700
   *
698
   *
701
   *    \f[
699
   *    \f[
702
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
700
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
703
   *    \f]
701
   *    \f]
704
   *
702
   *
705
   * which now involves the distance \f$u\f$ is from 1 in the denonator.
703
   * which now involves the distance \f$u\f$ is from 1 in the denominator.
706
   */
704
   */
707
  double GetValue (double mean, double shape, double bound);
705
  double GetValue (double scale, double shape, double bound);
708
706
709
  /**
707
  /**
710
   * \brief Returns a random unsigned integer from a Pareto distribution with the specified mean, shape, and upper bound.
708
   * \brief Returns a random unsigned integer from a Pareto distribution with the specified mean, shape, and upper bound.
711
   * \param [in] mean Mean parameter for the Pareto distribution.
709
   * \param [in] scale Scale parameter for the Pareto distribution.
712
   * \param [in] shape Shape parameter for the Pareto distribution.
710
   * \param [in] shape Shape parameter for the Pareto distribution.
713
   * \param [in] bound Upper bound on values returned.
711
   * \param [in] bound Upper bound on values returned.
714
   * \return A random unsigned integer value.
712
   * \return A random unsigned integer value.
 Lines 721-743    Link Here 
721
   *         x = \frac{scale}{u^{\frac{1}{shape}}}
719
   *         x = \frac{scale}{u^{\frac{1}{shape}}}
722
   *    \f]
720
   *    \f]
723
   *
721
   *
724
   * is a value that would be returned normally, where
722
   * is a value that would be returned normally.
725
   *     
723
   *
726
   *    \f[
724
   * The value returned in the antithetic case, \f$x'\f$, is
727
   *         scale  =  mean * (shape - 1.0) / shape  .
728
   *    \f]
729
   *    
730
   * Then \f$(1 - u\f$) is the distance that \f$u\f$ would be from
731
   * \f$1\f$.  The value returned in the antithetic case, \f$x'\f$, is
732
   * calculated as
725
   * calculated as
733
   *
726
   *
734
   *    \f[
727
   *    \f[
735
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
728
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
736
   *    \f]
729
   *    \f]
737
   *
730
   *
738
   * which now involves the distance \f$u\f$ is from 1 in the denonator.
731
   * which now involves the distance \f$u\f$ is from 1 in the denominator.
739
   */
732
   */
740
  uint32_t GetInteger (uint32_t mean, uint32_t shape, uint32_t bound);
733
  uint32_t GetInteger (uint32_t scale, uint32_t shape, uint32_t bound);
741
734
742
  /**
735
  /**
743
   * \brief Returns a random double from a Pareto distribution with the current mean, shape, and upper bound.
736
   * \brief Returns a random double from a Pareto distribution with the current mean, shape, and upper bound.
 Lines 757-771    Link Here 
757
   *         scale  =  mean * (shape - 1.0) / shape  .
750
   *         scale  =  mean * (shape - 1.0) / shape  .
758
   *    \f]
751
   *    \f]
759
   *    
752
   *    
760
   * Then \f$(1 - u\f$) is the distance that \f$u\f$ would be from
753
   * The value returned in the antithetic case, \f$x'\f$, is
761
   * \f$1\f$.  The value returned in the antithetic case, \f$x'\f$, is
762
   * calculated as
754
   * calculated as
763
   *
755
   *
764
   *    \f[
756
   *    \f[
765
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
757
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
766
   *    \f]
758
   *    \f]
767
   *
759
   *
768
   * which now involves the distance \f$u\f$ is from 1 in the denonator.
760
   * which now involves the distance \f$u\f$ is from 1 in the denominator.
769
   *
761
   *
770
   * Note that we have to re-implement this method here because the method is
762
   * Note that we have to re-implement this method here because the method is
771
   * overloaded above for the three-argument variant and the c++ name resolution
763
   * overloaded above for the three-argument variant and the c++ name resolution
 Lines 786-806    Link Here 
786
   *         x = \frac{scale}{u^{\frac{1}{shape}}}
778
   *         x = \frac{scale}{u^{\frac{1}{shape}}}
787
   *    \f]
779
   *    \f]
788
   *
780
   *
789
   * is a value that would be returned normally, where
781
   * is a value that would be returned normally.
790
   *     
782
   *
791
   *    \f[
783
   * The value returned in the antithetic case, \f$x'\f$, is
792
   *         scale  =  mean * (shape - 1.0) / shape  .
793
   *    \f]
794
   *    
795
   * Then \f$(1 - u\f$) is the distance that \f$u\f$ would be from
796
   * \f$1\f$.  The value returned in the antithetic case, \f$x'\f$, is
797
   * calculated as
784
   * calculated as
798
   *
785
   *
799
   *    \f[
786
   *    \f[
800
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
787
   *         x' = \frac{scale}{{(1 - u)}^{\frac{1}{shape}}} ,
801
   *    \f]
788
   *    \f]
802
   *
789
   *
803
   * which now involves the distance \f$u\f$ is from 1 in the denonator.
790
   * which now involves the distance \f$u\f$ is from 1 in the denominator.
804
   */
791
   */
805
  virtual uint32_t GetInteger (void);
792
  virtual uint32_t GetInteger (void);
806
793
 Lines 808-813    Link Here 
808
  /** The mean parameter for the Pareto distribution returned by this RNG stream. */
795
  /** The mean parameter for the Pareto distribution returned by this RNG stream. */
809
  double m_mean;
796
  double m_mean;
810
797
798
  /** The scale parameter for the Pareto distribution returned by this RNG stream. */
799
  double m_scale;
800
811
  /** The shape parameter for the Pareto distribution returned by this RNG stream. */
801
  /** The shape parameter for the Pareto distribution returned by this RNG stream. */
812
  double m_shape;
802
  double m_shape;
813
803

Return to bug 2513