code: public SVD factor(DenseMatrix A) throws NotConvergedException {
          if (A.numRows() != m)
              throw new IllegalArgumentException("A.numRows() != m");
          else if (A.numColumns() != n)
              throw new IllegalArgumentException("A.numColumns() != n");
  
          intW info = new intW(0);
          LAPACK.getInstance().dgesdd(job.netlib(), m, n, A.getData(),
                  Matrices.ld(m), S, vectors ? U.getData() : new double[0],
                  Matrices.ld(m), vectors ? Vt.getData() : new double[0],
                  Matrices.ld(n), work, work.length, iwork, info);
  
          if (info.val > 0)
              throw new NotConvergedException(
                      NotConvergedException.Reason.Iterations);
          else if (info.val < 0)
              throw new IllegalArgumentException();
  
          return this;
      }
docs: Computes an SVD
  
  @param A
  Matrix to decompose. Size must conform, and it will be
  overwritten on return. Pass a copy to avoid this
  @return The current decomposition
  @throws NotConvergedException