Exemplo n.º 1
0
        public LogNormal(double m, double s)
        {
            this.m = m;
            this.s = s;

            random = new RandomBSV(179029053, 457816087);
        }
        public MixtureDistribution(IDistribution[] distributions, double[] pi)
        {
            this.distributions = distributions;
            this.pi            = pi;

            random = new RandomBSV(179029053, 457816087);
        }
Exemplo n.º 3
0
        public BoxMullerNormal(double m, double stdDeviation)
        {
            this.m = m;
            this.s = stdDeviation;

            isSaved = false;
            random  = new RandomBSV(24149775, 19581355);
        }
Exemplo n.º 4
0
        public MacLarenRandom(RandomBSV rand1, RandomBSV rand2)
        {
            table = new double[K];

            this.rand1 = rand1;
            this.rand2 = rand2;

            for (int i = 0; i < K; i++)
            {
                table[i] = rand1.Next();
            }
        }
Exemplo n.º 5
0
        public double Next(RandomBSV rand)
        {
            List <double> a = SampleGenerator.GenerateSample(rand, N);

            double x = 0.0;

            foreach (double element in a)
            {
                x += element;
            }

            x -= N / 2;
            x *= Math.Sqrt(12.0 / N);

            return(m + Math.Sqrt(s) * x);
        }
Exemplo n.º 6
0
 public ChiSquared(double m)
 {
     this.m = m;
     random = new RandomBSV(179029053, 457816087);
 }
Exemplo n.º 7
0
 public Laplace(double a)
 {
     this.a = a;
     random = new RandomBSV(179029053, 457816087);
 }
Exemplo n.º 8
0
 public Normal(double mean, double stdDeviation)
 {
     m      = mean;
     s      = stdDeviation;
     random = new RandomBSV(24149775, 19581355);
 }
Exemplo n.º 9
0
 public Exponential(double a)
 {
     this.a = a;
     random = new RandomBSV(179029053, 457816087);
 }