From: P Z. <zol...@gm...> - 2009-07-14 19:59:49
|
On Wed, 08 Jul 2009 17:09:52 +0200, Alan Grimes <ag...@sp...> wrote: >> 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. > > It seems that Eigen can only deal with floats, not doubles. =( I tried > to get help with it but couldn't. I'm attaching an example, with doubles. You need to have Eigen in the include patch, so compile it with a command like: g++ -I /path/whre/eigen/is/ lu-000.cpp -o name_of_the_binary For the moment it's a very minimal demo, but basically that's all we need. > > Checking linear algebra operations is perfectly straightforward. > > Function validateLU() checks performLU(), and the mathtest program in > testing checks fbsub and performLU(). > > The only active bug that these two functions have revealed is a row > permutation bug =\. > Yes, but it's easier to debug if you can have the correct values directly, not only an indication about 'here something is wrong'. >> About configuration options: we could provide multiple Matrix >> impelmenations this way, by using the preprocessor defines and setting >> those using configure. > > I was thinking more along the lines of switching on and off whole files, > but yeah, that's the idea. > Actually we could put different implementations in different files. Actually it would be quite useful. |