help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chol2inv for Octave?


From: John W. Eaton
Subject: Re: chol2inv for Octave?
Date: Fri, 6 May 2005 14:04:09 -0400

On  6-May-2005, Mike Miller wrote:

| That's quick service!!  I'm very impressed.

It happens that I needed this function myself (see
src/DLD-FUNCTIONS/__qp__.cc) and saw a reasonably quick way to do it.

| I recommend that the description for chol2inv read as follows:
| 
| -- Loadable Function:  chol2inv (U)
|      Invert a symmetric, positive definite square matrix from its
|      Cholesky decomposition, U.  Note that U should be an upper-triangular
|      matrix with positive diagonal elements.  chol2inv(U) provides
|      inv(U'*U) but it is much faster than using inv.  See also: chol,
|      cholinv.

OK.

| The only thing missing now is whether cholinv, chol2inv and chol will work 
| on symmetric Hermitian matrices containing complex numbers.

Yes, I defined complex versions too.

| One small point:  If "U" has negative diagonal elements, but none equal to 
| zero, then U'*U is still symmetric positive definite, so the chol2inv 
| might still run but I don't know what it requires (this must depend on 
| LAPACK).  If any diagonal element of U equals 0, then U'*U will be 
| singular and chol2inv should fail.

You will have to check this out.  The code simply checks the INFO flag
from the Lapack routines, so you get whatever Lapack does, which seems
to be a check for postive-definiteness, but not symmetry.  If someone
would like to add that check, I'd welcome a patch.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]