SingularValueDecomposition implements java.io.Serializable { public Matrix getU() { if (transpositionNeeded) { return new DenseMatrix(v); } else { int numCols = Math.min(m + 1, n); Matrix r = new DenseMatrix(m, numCols); for (int i = 0; i < m; i++) { for (int j = 0; j < numCols; j++) { r.set(i, j, u[i][j]); } } return r; } } SingularValueDecomposition(Matrix arg); double cond(); Matrix getS(); double[] getSingularValues(); Matrix getU(); Matrix getV(); double norm2(); int rank(); @Override String toString();  }
@Test public void testUOrthogonal() { checkOrthogonal(new SingularValueDecomposition(new DenseMatrix(testSquare)).getU()); checkOrthogonal(new SingularValueDecomposition(new DenseMatrix(testNonSquare)).getU()); checkOrthogonal(new SingularValueDecomposition(new DenseMatrix(testNonSquare).transpose()).getU()); }