On Sun, May 30, 2010 at 3:37 PM, Carlo de Falco <[email protected]> wrote: > > On 26 May 2010, at 09:10, Jaroslav Hajek wrote: > >> >> OK. Please note that your C++ version only works in real doubles, >> whereas a properly written m-file function will probably work well in >> both single and double (that is typically automatic, one only needs to >> be careful about eps() and tolerances) and both real and complex (that >> is sometimes harder, requires using ' and .' properly, sometimes it is >> not possible). > > Jaroslav, > I just commited an pgmres.m and mgorth.[m,oct] to linear-algebra. > pgmres.m seems to be almost as fast as pgmres.oct, as long as mgorth.oct is > used > but is slower if mgorth.m is used.
Good, that works as expected, then. > On the other hand the oct file version of > mgorth > suffers from the problems you noted above. > What do you suggest? > c. > I improved mgorth using a template to compute in single/double real/complex. 3.3.51+ has even more powerful tools to reduce the amount of boilerplate code for such tasks, but I tried to avoid those, so I hope the file is compilable by 3.2.x though I haven't tried it. I also let mgorth normalize the resulting vector and store it as the last component of h, and modified pgmres.m accordingly. mgorth.m is removed. regards -- RNDr. Jaroslav Hajek, PhD computing expert & GNU Octave developer Aeronautical Research and Test Institute (VZLU) Prague, Czech Republic url: www.highegg.matfyz.cz ------------------------------------------------------------------------------ _______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
