Given the
matrix of which an eigenvalue is desired, the
initial guess
sigma, and a right hand side
v, the solution
y needs to be calculated in a fast way. This part of the code is
time-critical as it is called at each iteration. To solve above equation, a
function object
solver needs to be passed, which is called as
solver(matrix,sigma,v,y)
The first two arguments stay the same
throughout the iteration and are the same as passed to
inverse. This
can (and should) be used by the solver to optimize the calculation.
If
(matrix - sigma * I) is singular an exception should be
thrown which will terminate the iterations.