optaplanner-benchmark/src/main/java/org/optaplanner/benchmark/impl/measurement/ScoreDifferencePercentage.java
public ScoreDifferencePercentage add(ScoreDifferencePercentage addend) {
        if (percentageLevels.length != addend.getPercentageLevels().length) {
            throw new IllegalStateException("The addend (" + addend + ")'s levelsLength (" +
                    addend.getPercentageLevels().length + ") is different from the base (" +
                    this + ")'s levelsLength (" + percentageLevels.length + ").");
        }
        double[] newPercentageLevels = new double[percentageLevels.length];
        for (int i = 0; i < percentageLevels.length; i++) {
            newPercentageLevels[i] = percentageLevels[i] + addend.percentageLevels[i];
        }
        return new ScoreDifferencePercentage(newPercentageLevels);
    }
public ScoreDifferencePercentage add(ScoreDifferencePercentage addend) {
        if (percentageLevels.length != addend.getPercentageLevels().length) {
            throw new IllegalStateException("The addend (" + addend + ")'s levelsLength (" +
                    addend.getPercentageLevels().length + ") is different from the base (" +
                    this + ")'s levelsLength (" + percentageLevels.length + ").");
        }
        double[] newPercentageLevels = new double[percentageLevels.length];
        for (int i = 0; i < percentageLevels.length; i++) {
            newPercentageLevels[i] = percentageLevels[i] + addend.percentageLevels[i];
        }
        return new ScoreDifferencePercentage(newPercentageLevels);
    }
public ScoreDifferencePercentage add ( ScoreDifferencePercentage addend ) { if ( percentageLevels . length != addend . getPercentageLevels ( ) . length ) { throw new IllegalStateException ( "The addend (" + addend + ")'s levelsLength (" + addend . getPercentageLevels ( ) . length + ") is different from the base (" + this + ")'s levelsLength (" + percentageLevels . length + ")." ) ; } double [ ] newPercentageLevels = new double [ percentageLevels . length ] ; for ( int i = 0 ; i < percentageLevels . length ; i ++ ) { newPercentageLevels [ i ] = percentageLevels [ i ] + addend . percentageLevels [ i ] ; } return new ScoreDifferencePercentage ( newPercentageLevels ) ; }
************************************************************************
************************************************************************