try_success("QRDecomposition...", "");
} catch (java.lang.RuntimeException e) {
errorCount = try_failure(errorCount, "QRDecomposition...",
"incorrect QR decomposition calculation");
}
SingularValueDecomposition SVD = A.svd();
try {
check(A, SVD.getU().times(SVD.getS().times(SVD.getV().transpose())));
try_success("SingularValueDecomposition...", "");
} catch (java.lang.RuntimeException e) {
errorCount = try_failure(errorCount, "SingularValueDecomposition...",
"incorrect singular value decomposition calculation");
}
DEF = new Matrix(rankdef);
try {
check(DEF.rank(),
Math.min(DEF.getRowDimension(), DEF.getColumnDimension())
- 1);
try_success("rank()...", "");
} catch (java.lang.RuntimeException e) {
errorCount = try_failure(errorCount, "rank()...",
"incorrect rank calculation");
}
B = new Matrix(condmat);
SVD = B.svd();
double[] singularvalues = SVD.getSingularValues();
try {
check(B.cond(),
singularvalues[0]
/ singularvalues[Math.min(B.getRowDimension(), B.getColumnDimension()) - 1]);