Beispiel #1
0
        public GammaGenerator(decimal eta, decimal lambda, int count, MLCG genMLCG)
        {
            Eta            = (int)eta;
            Lambda         = (double)lambda;
            _generatorMLCG = genMLCG;

            for (int i = 0; i < count; i++)
            {
                _generatorMLCG.NextNumber();
            }
        }
Beispiel #2
0
        public SimpsonGenerator(decimal a, decimal b, int count, MLCG genMLCG)
        {
            A = (double)a;
            B = (double)b;
            _intervalRandoms = new double[count];

            for (int i = 0; i < count; i++)
            {
                _intervalRandoms[i] = (A / 2) + (B / 2 - A / 2) * genMLCG.NextNumber();
            }
        }
Beispiel #3
0
        public TriangularGenerator(decimal a, decimal b, bool isMin, int count, MLCG genMLCG)
        {
            A              = (double)a;
            B              = (double)b;
            UsingMin       = isMin;
            _generatorMLCG = genMLCG;

            for (int i = 0; i < count; i++)
            {
                _generatorMLCG.NextNumber();
            }
        }
Beispiel #4
0
        public GaussGenerator(decimal n, decimal expectedValue, decimal standardDeviation, int count, MLCG genMLCG)
        {
            N = (int)n;
            StandardDeviation = (double)standardDeviation;
            ExpectedValue     = (double)expectedValue;
            _generatorMLCG    = genMLCG;

            for (int i = 0; i < count; i++)
            {
                _generatorMLCG.NextNumber();
            }
        }
Beispiel #5
0
 public UniformGenerator(decimal a, decimal b, MLCG genMLCG)
 {
     A = (double)a;
     B = (double)b;
     _generatorMLCG = genMLCG;
 }
Beispiel #6
0
 public ExponentialGenerator(decimal lambda, MLCG genMLCG)
 {
     Lambda         = (double)lambda;
     _generatorMLCG = genMLCG;
 }