Given the matrix
of which an eigenvalue is desired, the
initial guess sigma
, and a right hand side v
, the solution
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
The first two arguments stay the same
throughout the iteration and are the same as passed to inverse
can (and should) be used by the solver to optimize the calculation.
(matrix - sigma * I)
is singular an exception should be
thrown which will terminate the iterations.