Accord.Statistics.Distributions.Univariate.KolmogorovSmirnovDistribution.computeA C# (CSharp) Method

computeA() private static method

Creates matrix A of the Pomeranz algorithm.
private static computeA ( int n, double A, double z ) : void
n int
A double
z double
return void
        private static void computeA(int n, double[] A, double z)
        {
            A[0] = 0;
            A[1] = 0;
            A[2] = z;
            A[3] = 1 - z;

            for (int i = 4; i < A.Length - 1; i++)
                A[i] = A[i - 2] + 1;

            A[A.Length - 1] = n;
        }