[MATRIX-SIG] Matrix class (obviously)

Konrad Hinsen hinsen@ibs.ibs.fr
Sun, 9 Nov 1997 17:02:23 +0100


> Eeek! This is not how to find a determinant! It not only is not going to
> work for matrices of big numbers, it won't work for big matrices of small
> numbers.  I'm sure there must be stuff in the Linear Algebra file to find an
> LU-decomposition. Then the determinant is the product of the diagonals of L.

That's how determinants ought to be calculated in LinearAlgebra, but what
is still there is a first quick hack I did (multiplying the eigenvalues).
I never got around to do it better because I didn't really need
determinants...

LU decomposition is not in LinearAlgebra as user-friendly function,
but looking at the linear equation solver is sufficient to see how
it's done.

> (An LU decomposition is writing M as a product of a lower triangular matrix
> times an upper triangular matrix with a diagonal of 1. The work involved is
> the same as the first stage of solving MX = B. No extra storage is actually
> involved since you can store L and U in the same n**2 locations as M. The
> determinant of a triangular matrix is the product of its diagonal elements.)

Currently all operations in LinearAlgebra allocate additional storage
to avoid destroying any input data. According to the "principle of
least surprise" this should be the default behaviour. However, it would
be nice to have destructive versions as an option...
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________