Here you can find the source of allEquals(double[][] sims)
public static boolean allEquals(double[][] sims)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean allEquals(double[][] sims) { double prev = 0; for (int i = 0; i < sims.length; i++) { for (int j = 0; j < sims[0].length; j++) { if (!(i == 0 && j == 0)) if (sims[i][j] != prev) return false; prev = sims[i][j];/*w ww .j a v a 2s. c o m*/ } } return true; } }