cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/util/MathUtil.java
public static int countNonZeroBeginning(final double... data) {
        int i = data.length - 1;
        while (i >= 0) {
            if (data[i--] != 0) {
                break;
            }
        }
        return i + 2;
    }
/**
     * Counts the number of values different of zero at the beginning of
     * an array.
     *
     * @param data the array of numbers
     * @return the number of values different of zero at the beginning of the array
     */
Counts the number of values different of zero at the beginning of
an array.

@param data the array of numbers
@return the number of values different of zero at the beginning of the array
Counts the number of values different of zero at the beginning of an array . @param data the array of numbers @return the number of values different of zero at the beginning of the array
public static int countNonZeroBeginning(final double... data) {
        int i = data.length - 1;
        while (i >= 0) {
            if (data[i--] != 0) {
                break;
            }
        }
        return i + 2;
    }
public static int countNonZeroBeginning ( final double ... data ) { int i = data . length - 1 ; while ( i >= 0 ) { if ( data [ i -- ] != 0 ) { break ; } } return i + 2 ; }
Counts the number of values different of zero at the beginning of
 an array.
Counts the number of values different of zero at the beginning of an array .