DESCRIPTION

Following matlab, the name eye() is used in place of I to denote identity matrices because I is often used as a subscript or as sqrt(-1). The dimensions of eye() are determined by context. The preconditioner interface is usefull when calling algorithms without any preconditioners, e.g.

    int status = pcg (a, x, b, eye(), 100, 1e-7);

IMPLEMENTATION

class eye {
public:
  eye() {}
  template<class T> const vec<T>& operator* (const vec<T>& x) const { return x; }
  template<class T> const vec<T>& solve (const vec<T>& x) const { return x; }
  template<class T> const vec<T>& trans_solve (const vec<T>& x) const { x; }
};