IETL Documentation - inverse.h

IETL library: inverse.h

This header implements the inverse iteration method, discussed, e.g. in Reference [2]. Inverse iteration looks for the eigenvalue closest to a guess sigma, but relies on a fast way to solve a linear equation with the matrix A-sigma*I, where I is the identity matrix and A the matrix of which the eigenvalue is desired. 


The inverse iteration function inverse

namespace ietl {

template <class MATRIX, class GEN, class IT, class VS>
std::pair<typename vectorspace_traits<VS>::magnitude_type,
typename vectorspace_traits<VS>::vector_type>
inverse(const MATRIX& matrix, GEN& gen, const SOLVER& solver, ITER& iter,
typename vectorspace_traits<VS>::magnitude_type sigma,
const VS& vec);

The inverse function takes six arguments:
It returns a pair consisting of the last estimate for the eigenvalue closest to sigma and the corresponding eigenvector.

The linear solver

Inverse iteration relies on the user to provide a fast solver for the system of linear equations given by

(matrix - sigma * I) y = v

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
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.

copyright 2002-2004 by Matthias Troyer and Prakash Dayal