code: public static DoubleMatrix[] fullSVD(DoubleMatrix A) {
          int m = A.rows;
          int n = A.columns;
  
          DoubleMatrix U = new DoubleMatrix(m, m);
          DoubleMatrix S = new DoubleMatrix(min(m, n));
          DoubleMatrix V = new DoubleMatrix(n, n);
  
          int info = NativeBlas.dgesvd('A', 'A', m, n, A.dup().data, 0, m, S.data, 0, U.data, 0, m, V.data, 0, n);
  
          if (info > 0) {
            throw new LapackConvergenceException("GESVD", info + " superdiagonals of an intermediate bidiagonal form failed to converge.");
          }
  
          return new DoubleMatrix[]{U, S, V.transpose()};
      }
docs: Compute a singular-value decomposition of A.
  
  @return A DoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V'