Matrix B = Matrices.random(A.numRows(), A.numColumns());
Matrix X = Matrices.random(A.numRows(), A.numColumns());
X = A.transSolve(B, X);
Matrix Y = A.transAmultAdd(X, X.copy().set(-1, B));
assertEquals(0, Y.norm(Matrix.Norm.Frobenius), tol);
assertEquals(Ad, A);
return;
} catch (MatrixSingularException e) {
Utilities.addDiagonal(A, Ad, 1);
} catch (MatrixNotSPDException e) {