code: public static boolean isEquals(ZMatrixD1 a , ZMatrixD1 b , double tol )
      {
          if( a.numRows != b.numRows || a.numCols != b.numCols ) {
              return false;
          }
  
          if( tol == 0.0 )
              return isEquals(a,b);
  
          final int length = a.getDataLength();
  
          for( int i = 0; i < length; i++ ) {
              if( !(tol >= Math.abs(a.data[i] - b.data[i])) ) {
                  return false;
              }
          }
          return true;
      }
docs: <p>
  Checks to see if each element in the two matrices are within tolerance of
  each other: tol &ge; |a<sub>ij</sub> - b<sub>ij</sub>|.
  <p>
  
  <p>
  NOTE: If any of the elements are not countable then false is returned.<br>
  NOTE: If a tolerance of zero is passed in this is equivalent to calling
  {@link #isEquals(ZMatrixD1, ZMatrixD1)}
  </p>
  
  @param a A matrix. Not modified.
  @param b A matrix. Not modified.
  @param tol How close to being identical each element needs to be.
  @return true if equals and false otherwise.