[Ktechlab-devel] Slowmatrix! =)
P Zoltan
zoltan.padrah at gmail.com
Wed Jul 8 13:19:55 UTC 2009
On Wed, 08 Jul 2009 08:12:43 +0200, Alan Grimes <agrimes at speakeasy.net>
wrote:
> Okay, Zoltan, you've taken an interest in my matrix and vector classes,
> now it's time for your final exam. =P
>
> I'm too lazy to do this myself, (actually, I urgently need to spend more
> time earning money!!!),
Do that then, but try to keep with your email up to date ;)
> but here's the idea take the interface to class
> Matrix (the LU solver) and implement a simple Gauss-jordan matrix
> inverter and call it "slowmatrix" (don't change the class name so that
> the alternate implementation can be compiled based on how the source is
> configured). You will be graded based on how efficient your overall
> approach to implementing each of the interface functions is and how well
> you take advantage of the functionality in QuickMatrix to shave cycles
> off of an inherently slow algorithm. =P
>
> Naturally, this alternate version must permit ktechlab to operate
> normally. (this is also an exam of your ability to research gauss-jordan
> elimination and implement it correctly.)
>
As I mentioned before, I'd like to take a different approach: use the
Eigen library instead of custom impelementation. That won't have strange
bugs. I want to test it and probably use it to validate the current LU
implementation, by using a fuzzy tehnique. If Eigen is fast enough, I'd
prefer to keep using it in ktechlab.
About the fuzzy testing: generate a matrix and a vector with random
elements; apply LU to them by our impelementation and also by Eigen. Then
compare the two; in another step solve the equation Ax=b, compare the
result again; if the error is too great, we have a bug and a testcase for
that bug.
About configuration options: we could provide multiple Matrix
impelmenations this way, by using the preprocessor defines and setting
those using configure.
The first thing I want to do is to find the minimal interface for the
Matrix class used by the rest of the program.
Opinions, suggestions?
More information about the Ktechlab-devel
mailing list