@Override public boolean equals(Object other){
  if (!(other instanceof Matrix)) {
    return false;
  }
  for (int r=0; r < rows; r++) {
    if (!Arrays.equals(data[r],((Matrix)other).data[r])) {
      return false;
    }
  }
  return true;
}

@ Override public boolean equals ( Object other ) { if ( ! ( other instanceof Matrix ) ) { return false ; } for ( int r = 0 ; r < rows ; r ++ ) { if ( ! Arrays . equals ( data [ r ] , ( ( Matrix ) other ) . data [ r ] ) ) { return false ; } } return true ; }
returns true iff this matrix is identical to the other .
