namespace ietl {The

template <class MATRIX, class GEN, class IT, class VS>

std::pair<typename vectorspace_traits<VS>::magnitude_type,

typename vectorspace_traits<VS>::vector_type>

rayleigh(const MATRIX& matrix, GEN& gen, const SOLVER& solver, ITER& iter, const VS& vec);

}

- The matrix
`m` - A generator
`start`which is used to create the starting vector of the iteration - a linear solver
`solver`, discussed in detail below

- The iteration control object
`iter` - The vector space object
`vec`

Given the `matrix` of which an eigenvalue is desired, the
latest guess for the eigenvalue `rho`, 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

`inverse`. This can (and should)
be used by the solver to optimize the calculation.

If` (matrix -
rho * I)` is singular an exception should be thrown which will
terminate the iterations.

solver(matrix,rho,v,y)The matrix stays the same throughout the iteration and is the same as passed to

If