CanvasClean.LoessInterpolator.checkIncreasing C# (CSharp) Méthode

checkIncreasing() private static méthode

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
Résultat 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]));
                }
            }
        }