Exemplo n.º 1
0
 public UnitSphereDistribution(RandomGenerator ran) 
   : base(ran) 
 {
   scale = 2.0 / Maximum;
 }
Exemplo n.º 2
0
 public PoissonDistribution (double mean, 
   RandomGenerator ran)
   : base(ran) 
 {
   Initialize(mean);
 }
Exemplo n.º 3
0
 public BinomialDistribution (double prob, int num, 
   RandomGenerator ran)
   : base(ran)
 { 
   Initialize(prob,num);
 }
Exemplo n.º 4
0
 public ChiSquareDistribution (double f, RandomGenerator ran) 
   : base(0.5*f,1.0,ran)
 {
   F = f;
 }
Exemplo n.º 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);
   }
Exemplo n.º 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);
 }
Exemplo n.º 7
0
 public BetaDistribution (double pa, double pb, 
   RandomGenerator ran)
   : base(ran) 
 { Initialize(pa,pb); }
Exemplo n.º 8
0
 public ExponentialDistribution (double mean, RandomGenerator ran)
   : base(ran)
 {
   m = mean;
   scale = 1.0/max_val;
 }
Exemplo n.º 9
0
 public ErlangDistribution (int order, double loc, 
   RandomGenerator ran): base(ran) 
 { 
   SetOrder(order,loc); 
 }
Exemplo n.º 10
0
 public LogNormalDistribution (double mean, double stdev, RandomGenerator ran) 
   : base(mean,stdev,ran) 
 {
   Initialize(mean,stdev);
 }
Exemplo n.º 11
0
 public NormalDistribution (double mean, double stdev, RandomGenerator ran)
   : base(ran)
 {
   cached = 0;
   m = mean;
   s = stdev;
   scale  = 2.0 / max_val;
 }
Exemplo n.º 12
0
 public U01_Distribution(RandomGenerator ran)
   : base(ran)
 {
   scale = 1.0 / max_val;
 }
Exemplo n.º 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) / max_val;
 }
Exemplo n.º 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)
 {
   gen = ran;
   max_val = ran.Maximum;
   seed = ran.Seed;
 }