code: public static boolean hasUncountable( DMatrixD1 m )
      {
          int length = m.getNumElements();
  
          for( int i = 0; i < length; i++ ) {
              double a = m.get(i);
              if( Double.isNaN(a) || Double.isInfinite(a))
                  return true;
          }
          return false;
      }
docs: Checks to see if any element in the matrix is NaN of Infinite.
  
  @param m A matrix. Not modified.
  @return True if any element in the matrix is NaN of Infinite.