Exemple #1
0
 public UnitSphereDistribution(RandomGenerator ran) 
   : base(ran) 
 {
   scale = 2.0 / generator.Maximum;
 }
Exemple #2
0
 public PoissonDistribution (double mean, 
   RandomGenerator ran)
   : base(ran) 
 {
   Initialize(mean);
 }
Exemple #3
0
 public BinomialDistribution (double prob, int num, 
   RandomGenerator ran)
   : base(ran)
 { 
   Initialize(prob,num);
 }
Exemple #4
0
 public ChiSquareDistribution (double f, RandomGenerator ran) 
   : base(0.5*f,1.0,ran)
 {
   F = f;
 }
Exemple #5
0
   FDistribution (double numf, double denomf, RandomGenerator ran)
     : base(ran)
   { 
     // check parameter range
     if (numf < 0.0 || denomf < 0.0)
       throw new ArgumentException(string.Format("Numerator ({0}) and denominator ({1}) degrees of freedom must be positive", numf, denomf));
 
     // store parameters
     NF = numf; 
     DF = denomf; 
 
     // initialize numerator and denominator chi-square distributions
     NumChi2 = new ChiSquareDistribution(NF,ran);
     DenomChi2 = new ChiSquareDistribution(DF,ran);
   }
Exemple #6
0
 public GammaDistribution (double order, double loc, 
   RandomGenerator ran) 
   // original: NormalDistribution(0.0,1.0,ran), // std. normal
 {
   normalDistribution = new NormalDistribution(0.0,1.0,ran);
   exponentialDistribution = new ExponentialDistribution(1.0,ran); // std. exponential
   
   Initialize(order,loc);
 }
Exemple #7
0
 public BetaDistribution (double pa, double pb, 
   RandomGenerator ran)
   : base(ran) 
 { Initialize(pa,pb); }
Exemple #8
0
 public ExponentialDistribution (double mean, RandomGenerator ran)
   : base(ran)
 {
   m = mean;
   scale = 1.0 / generator.Maximum;
 }
Exemple #9
0
 public ErlangDistribution (int order, double loc, 
   RandomGenerator ran): base(ran) 
 { 
   SetOrder(order,loc); 
 }
Exemple #10
0
 public LogNormalDistribution (double mean, double stdev, RandomGenerator ran) 
   : base(mean,stdev,ran) 
 {
   Initialize(mean,stdev);
 }
Exemple #11
0
 public NormalDistribution (double mean, double stdev, RandomGenerator ran)
   : base(ran)
 {
   cached = false;
   mu = mean;
   sigma = stdev;
   scale = 2.0 / generator.Maximum;
 }
Exemple #12
0
 public U01_Distribution(RandomGenerator ran)
   : base(ran)
 {
   scale = 1.0 / generator.Maximum;
 }
Exemple #13
0
 public UniformDistribution (double lo, double hi, RandomGenerator ran) 
   : base(ran)
 {
   if (hi > lo) 
   { 
     low = lo; high = hi;
   } 
   else 
   { 
     low = hi; high = lo; 
   }
   scale = (high-low) / generator.Maximum;
 }
Exemple #14
0
 /// <summary>Initialize the distribution by providing the random generator used
 /// to produce the random values.</summary>
 /// <param name="ran">The random generator used to produce the random values.</param>
 public  ProbabilityDistribution(RandomGenerator ran)
 {
   generator = ran;
 }