you can find at the bottom of this page http://wiki.tcl.tk/778 additions made by me for linearalgebra package.
I hope you can include it into the tree.
(actually only matrix rank is missing, but it would require combinatory functions; matrix determinant is computed with cofactor expansion, that -yes- is cpu expensive. I'll do a better version using Gauss-Jordan elimination in the future)
Logged In: YES
user_id=1628983
Originator: YES
sorry, Tcl Wiki is under maintenance. best to check that: http://rafb.net/p/tQ0k4t70.txt
Logged In: YES
user_id=400048
Originator: NO
I will be looking into these shortly. I got the code from "ratfb" as a reference implementation.
What we will need further is a few test cases and documentation. But let me study the code a bit
first :)
Logged In: YES
user_id=400048
Originator: NO
I have started the incorporation of the code into the linearalgebra package.
That is: I am writing some tests to check the code (removing Tcl8.5-isms and
one or two bugs along the way).
Suggestion for the determinant:
Use LU decomposition and then multiply the diagonal elements to obtain
the determinant. (I am not familiar with cofactors, I am afraid, so I
cannot comment on their usefulness, but this would speed up the
computation).
Logged In: YES
user_id=1628983
Originator: YES
hmmm....
didn't know about LU (LDU) decomposition. I quickly read about it on wikipedia, an I see it is a slightly modified Gauss-Jordan algorithm.
AFAIK Gauss elimination *changes* the determinant (well, it does in a predictable way). I can't find this information on the "LU decomposition" page though...
also the Gauss algorithm has some quirks that make the code more complicated (if one wants to work with any kind of matrix), so it will require me time & knowledge (now I am a bit busy with exams)
Logged In: YES
user_id=400048
Originator: NO
No, Gauss elimination does not change the determinant: you add a multiple of an existing row to another row and determinants are invariant under this operation. LU decomposition is indeed little
more than Gauss elimination (I use the terms as synonyms).
We should not be hasty - better do a good job that takes a bit longer than a sloppy one. So don't
worry.