Diagonalization of Hermitean matrix

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Diagonalization of Hermitean matrix

Bugzilla from torquil@gmail.com
Hi!

Is there any way of letting Octave know that the matrix I am
diagonalizing with eig() is Hermitean? The matrix_type() function dosn't
seem to contain a choice for a Hermitean matrix. I was hoping that this
could lead to a more efficient choice of LAPACK-function when invoking
eig(). I think LAPACK has a diagonalization algorithm that is optimized
for Hermitean matrices, so Octave should be able to use that algorithm
in that case.

Best regards
Torquil Sørensen
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Diagonalization of Hermitean matrix

Jaroslav Hajek-2
On Fri, Jan 23, 2009 at 12:21 PM, Torquil Macdonald Sørensen
<[hidden email]> wrote:

> Hi!
>
> Is there any way of letting Octave know that the matrix I am
> diagonalizing with eig() is Hermitean? The matrix_type() function dosn't
> seem to contain a choice for a Hermitean matrix. I was hoping that this
> could lead to a more efficient choice of LAPACK-function when invoking
> eig(). I think LAPACK has a diagonalization algorithm that is optimized
> for Hermitean matrices, so Octave should be able to use that algorithm
> in that case.
>
> Best regards
> Torquil Sørensen

If your matrix really is hermitian, eig should be able to discover it
and exploit the hermitianness via the LAPACK CHEEV/ZHEEV functions.
There is, AFAIK, no option to eig that would force a matrix to be
treated as hermitian if it isn't.
The simplest option for you is to make sure the matrix is truly
hermitian. This may mean some overhead, but compared to the overhead
of the EVD itself, it should be quite negligible.

regards

--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Diagonalization of Hermitean matrix

Bugzilla from torquil@gmail.com
Jaroslav Hajek wrote:

> On Fri, Jan 23, 2009 at 12:21 PM, Torquil Macdonald Sørensen
> <[hidden email]> wrote:
>> Hi!
>>
>> Is there any way of letting Octave know that the matrix I am
>> diagonalizing with eig() is Hermitean? The matrix_type() function dosn't
>> seem to contain a choice for a Hermitean matrix. I was hoping that this
>> could lead to a more efficient choice of LAPACK-function when invoking
>> eig(). I think LAPACK has a diagonalization algorithm that is optimized
>> for Hermitean matrices, so Octave should be able to use that algorithm
>> in that case.
>>
>> Best regards
>> Torquil Sørensen
>
> If your matrix really is hermitian, eig should be able to discover it
> and exploit the hermitianness via the LAPACK CHEEV/ZHEEV functions.
> There is, AFAIK, no option to eig that would force a matrix to be
> treated as hermitian if it isn't.
> The simplest option for you is to make sure the matrix is truly
> hermitian. This may mean some overhead, but compared to the overhead
> of the EVD itself, it should be quite negligible.
>
> regards
>

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave