code: public static boolean isZeros(DMatrixD1 m , double tol )
      {
          int length = m.getNumElements();
  
          for( int i = 0; i < length; i++ ) {
              if( Math.abs(m.get(i)) > tol )
                  return false;
          }
          return true;
      }
docs: Checks to see all the elements in the matrix are zeros
  
  @param m A matrix. Not modified.
  @return True if all elements are zeros or false if not