Boost logo

Ublas :

Subject: Re: [ublas] [bindings] How to use lapack::pbtrf?
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2010-07-28 04:14:34


On Wed, Jul 28, 2010 at 8:38 AM, Rutger ter Borg <rutger_at_[hidden]> wrote:
> Marco Guazzone wrote:
>
>> Hello!
>>
>> I'm here again :P
>>
>> Sorry for stressing, but this time I'm unable to use PBTRF (Cholesky
>> factorization for symmetric/hermitian matrices).
>>
>> Specifically, I have a symmetric matrix, for instance:
>>   ublas::symmetric_matrix<double,ublas::lower,ublas::column_major> A
>>
>> If I call PBTRF:
>>   bindings::lapack::pbtrf(A)
>> I get compiler errors like these ones:
>
> [snip]
>
>> Where I'm wrong?
>
> Perhaps you are trying to use a computational routine that is for banded
> matrices? Shouln't you be using sytrf (symmetric) and/or hetrf (hermitian)?
>

Hi,

Indeed, you're right.

Taking a better look at LUG
(http://www.netlib.org/lapack/lug/node142.html) I found that PBTRF is
for special type of symmetric/hermitian matrices, that is for
symmetric/hermitian positive definite banded matrices.

Also I saw that LAPACK discriminates between different kind of
symmetric matrices:

?PBTRF: Cholesky factorization for symmetric/Hermitian positive
definite band matrix

?POTRF: Cholesky factorization for symmetric/Hermitian positive definite matrix.

?PPTRF: Cholesky factorization for symmetric/Hermitian positive
definite matrix in package storage.

?PTTRF: LDLH factorization for symmetric/Hermitian positive definite
tridiagonal matrix

?SPTRF/?HPTRF: factorization using the Bunch-Kaufman diagonal pivoting
method for real symmetric/complex symmetric/complex Hermitian
indefinite matrix in packed storage.

?SYTRF/?HETRF: factorization using the Bunch-Kaufman diagonal pivoting
method for real symmetric/complex symmetric/complex Hermitian
indefinite matrix

I think that for my case, i.e., ublas::symmetric_matrix, I should use
SYTRF/HETRF (as just you suggested) and ignore the others.

As always, thank you very much for the help!!

Cheers,

-- Marco