@Test public void testEqual() { assertTrue(DataUtilities.equal(null, null)); double[][] a = new double[5][]; double[][] b = new double[5][]; assertTrue(DataUtilities.equal(a, b)); a = new double[4][]; assertFalse(DataUtilities.equal(a, b)); b = new double[4][]; assertTrue(DataUtilities.equal(a, b)); a[0] = new double[6]; assertFalse(DataUtilities.equal(a, b)); b[0] = new double[6]; assertTrue(DataUtilities.equal(a, b)); a[0][0] = 1.0; assertFalse(DataUtilities.equal(a, b)); b[0][0] = 1.0; assertTrue(DataUtilities.equal(a, b)); a[0][1] = Double.NaN; assertFalse(DataUtilities.equal(a, b)); b[0][1] = Double.NaN; assertTrue(DataUtilities.equal(a, b)); a[0][2] = Double.NEGATIVE_INFINITY; assertFalse(DataUtilities.equal(a, b)); b[0][2] = Double.NEGATIVE_INFINITY; assertTrue(DataUtilities.equal(a, b)); a[0][3] = Double.POSITIVE_INFINITY; assertFalse(DataUtilities.equal(a, b)); b[0][3] = Double.POSITIVE_INFINITY; assertTrue(DataUtilities.equal(a, b)); a[0][4] = Double.POSITIVE_INFINITY; assertFalse(DataUtilities.equal(a, b)); b[0][4] = Double.NEGATIVE_INFINITY; assertFalse(DataUtilities.equal(a, b)); b[0][4] = Double.POSITIVE_INFINITY; assertTrue(DataUtilities.equal(a, b)); }
public static boolean equal(double[][] a, double[][] b) { if (a == null) { return (b == null); } if (b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; i++) { if (!Arrays.equals(a[i], b[i])) { return false; } } return true; }
DataUtilities { public static boolean equal(double[][] a, double[][] b) { if (a == null) { return (b == null); } if (b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; i++) { if (!Arrays.equals(a[i], b[i])) { return false; } } return true; } }
DataUtilities { public static boolean equal(double[][] a, double[][] b) { if (a == null) { return (b == null); } if (b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; i++) { if (!Arrays.equals(a[i], b[i])) { return false; } } return true; }  }
DataUtilities { public static boolean equal(double[][] a, double[][] b) { if (a == null) { return (b == null); } if (b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; i++) { if (!Arrays.equals(a[i], b[i])) { return false; } } return true; }  static boolean equal(double[][] a, double[][] b); static double[][] clone(double[][] source); static double calculateColumnTotal(Values2D data, int column); static double calculateColumnTotal(Values2D data, int column,
             int[] validRows); static double calculateRowTotal(Values2D data, int row); static double calculateRowTotal(Values2D data, int row,
             int[] validCols); static Number[] createNumberArray(double[] data); static Number[][] createNumberArray2D(double[][] data); static KeyedValues getCumulativePercentages(KeyedValues data); }
DataUtilities { public static boolean equal(double[][] a, double[][] b) { if (a == null) { return (b == null); } if (b == null) { return false; } if (a.length != b.length) { return false; } for (int i = 0; i < a.length; i++) { if (!Arrays.equals(a[i], b[i])) { return false; } } return true; }  static boolean equal(double[][] a, double[][] b); static double[][] clone(double[][] source); static double calculateColumnTotal(Values2D data, int column); static double calculateColumnTotal(Values2D data, int column,
             int[] validRows); static double calculateRowTotal(Values2D data, int row); static double calculateRowTotal(Values2D data, int row,
             int[] validCols); static Number[] createNumberArray(double[] data); static Number[][] createNumberArray2D(double[][] data); static KeyedValues getCumulativePercentages(KeyedValues data);  }