assertEquals(A, SVD.factorize(A));
}
public void testFactor() throws NotConvergedException {
SVD svd = new SVD(A.numRows(), A.numColumns());
assertEquals(A, svd.factor(A.copy()));
}
private void assertEquals(Matrix A, SVD svd) {
TridiagMatrix S = new TridiagMatrix(svd.getS().length);
System.arraycopy(svd.getS(), 0, S.getDiagonal(), 0, svd.getS().length);