|
From: | Marco Caliari |
Subject: | Re: Socis 16 - Problem with pcg |
Date: | Mon, 4 Jul 2016 10:15:51 +0200 (CEST) |
User-agent: | Alpine 2.10 (DEB 1266 2009-07-14) |
Moreover my mentors told me that, since it is difficult to determine if A is positive definite or not, the simplest way to check it is to run pcg or the Cholesky factorization (another function that works with positive definite matrices). If pcg / Cholesky doesn't converge then we are sure that A is not positive definite.
Dear Cristiano, the above statement is a little bit unprecise. In exact arithmetic A is SPD iff it admits a Choleksy factorizationif A is SPD, pcg converges but there are non-SPD matrices for which it converges
And then there are floating point arithmetic and Hilbert matrices... Anyway, for your non-SPD matrix A=[2,2+1i,...] and b=A*ones(3,1), pcg gives the correct result (due to complex comparison between alpha and 0). What to do in this case? I'm in favor of stopping pcg (in this case it is easy since the second alpha has a large negative real part). If I'm using pcg, it is because I think A is SPD. If it not the case, I did something wrong, or the matrix is very ill-conditioned and I would like to be informed. I don't like to have the right solution only by chance.
Marco
[Prev in Thread] | Current Thread | [Next in Thread] |