
On Tue, Oct 20, 2009 at 2:41 AM, Thomas Klimpel <Thomas.Klimpel@synopsys.com> wrote:
The final piece to fully confuse me are the files "matrix_determinant.hpp" and "matrix_inverse.hpp".
They are part of the library interface, not examples.
But in this case, I wonder why you used an algorithm of complexity O(n!) for computing the determinant, when it's easy to implement an algorithm of complexity O(n^3) for computing the determinant. (The complexity of O(n^2*!(n-1)) for computing the inverse is also not better.)
You are correct that the current implementations are not very efficient for large size matrices, where "large" is perhaps as small as 5x5 for some values of "very". :) (However the overloads that kick in automatically for 2x2, 3x3 and 4x4 matrices are efficient.)
I doubt that you would propose a totally inefficient library for review.
My efforts have been focused on getting the interface correct, and on decoupling algorithms from data types. There is more work to be done. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode