Exemple #1
0
        private double InitializePiACalcCellValue(TransitionMatrixInput inputParameters, int i, int j, int matrixSize, Faculty faculty, XRandom rng, int jCorrector)
        {
            var noiseFactor = 1 + 0.2 * (rng.NextDouble() - 0.5);

            if (inputParameters.ExtendedTransitionMatrix && i == 0 && j + 1 == matrixSize)
            {
                return(0.0);
            }
            if (i < j + jCorrector)
            {
                return(Math.Pow(inputParameters.Lambda, -i + j + jCorrector - 1) / faculty.Calc(-i + j + jCorrector - 1) * noiseFactor);
            }
            return(Math.Pow(inputParameters.Lambda, i - (j + jCorrector) - 1) / (2 * faculty.Calc(i - (j + jCorrector) - 1)) * noiseFactor);
        }