private void runSVD() { int gramDimension = gramMatrix.numRows(); try { svd = new no.uib.cipr.matrix.SVD(gramDimension, gramDimension).factor(gramMatrix); } catch (NotConvergedException e) { throw new RuntimeException(e); } double[] Vt_1D = svd.getVt().getData(); rightEigenvectors = LinearAlgebraUtils.reshape1DArray(Vt_1D, gramDimension, gramDimension); } }
private void runSVD() { int gramDimension = gramMatrix.numRows(); try { svd = new no.uib.cipr.matrix.SVD(gramDimension, gramDimension).factor(gramMatrix); } catch (NotConvergedException e) { throw new RuntimeException(e); } double[] Vt_1D = svd.getVt().getData(); rightEigenvectors = LinearAlgebraUtils.reshape1DArray(Vt_1D, gramDimension, gramDimension); } }
/** * Convenience method for computing a full SVD * * @param A * Matrix to decompose, not modified * @return Newly allocated factorization * @throws NotConvergedException */ public static SVD factorize(Matrix A) throws NotConvergedException { return new SVD(A.numRows(), A.numColumns()).factor(new DenseMatrix(A)); }
/** * Convenience method for computing a full SVD * * @param A * Matrix to decompose, not modified * @return Newly allocated factorization * @throws NotConvergedException */ public static SVD factorize(Matrix A) throws NotConvergedException { return new SVD(A.numRows(), A.numColumns()).factor(new DenseMatrix(A)); }
SVD s = svd.factor(tmp); U = s.getU(); S = s.getS();
internalSVD.factor( new no.uib.cipr.matrix.DenseMatrix( matrix.getInternalMatrix() ) );
internalSVD.factor( new no.uib.cipr.matrix.DenseMatrix( matrix.getInternalMatrix() ) );
internalSVD.factor( new no.uib.cipr.matrix.DenseMatrix( matrix.getInternalMatrix() ) );