CanvasClean.LoessInterpolator.checkIncreasing C# (CSharp) 메소드

checkIncreasing() 개인적인 정적인 메소드

Check that elements of the abscissae array are in an increasing order. Throws MathException if the abscissae array is not in an increasing order.
private static checkIncreasing ( double xval ) : void
xval double the abscissae array
리턴 void
        private static void checkIncreasing(double[] xval)
        {
            for (int i = 0; i < xval.Length; ++i)
            {
                if (i >= 1 && xval[i - 1] > xval[i])
                {
                    throw new ApplicationException(
                        string.Format("the abscissae array must be sorted in an increasing order, but the {0}-th element is {1} whereas {2}-th is {3}",
                        i - 1, xval[i - 1], i, xval[i]));
                }
            }
        }