JuliaLang/IterativeSolvers.jl — pull request #5 by priesj (2013-12-06 06:58:58+00:00)
Title: GMRES for Real/Complex linear operators with Left/Right Preconditioning

I realize there is a pull request for another GMRES, but I think this implementation is a bit more general. (I've had it laying around which is why I didn't fork the other version.)

I've also tried to take into account the discussion in #2 regarding functions [i.e. A(x) evaluation] and types supporting A*x (or M\x for preconditioners). You can see the function is written entirely in the A(x) style and types supporting A*x and M\x are wrapped in anonymous functions.

I also looked into using the KrylovSubspace type as mentioned in #3. The problem is some iterations (like the eigenvalue iterations) require more than just evaluation of A(x) (e.g. (A-sigma*I)\x). This was also mentioned in #2 with respect to methods requiring A*x and A'*x.

It's fairly simple to support the function syntax for individual solvers, but to me there wasn't an obvious and elegant way to write all the methods in terms of a single KrylovSubspace type unless we restrict the solvers to types implementing A*x, A\x, (A-sigma*I)\x, et cetera as needed.