eye2rheolef
The identity matrix
Overview
Following octave, the name eye_rep class 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_rep are determined by the context. This class is here useful in the context of preconditioner interfaces: it allows calls of algorithms without any preconditioners, e.g.
int status = cg (a, x, b, eye_rep<Float>(), 100, 1e-7);
Implementation
template<class T, class M = rheo_default_memory_model>
class eye_rep : public solver_abstract_rep<T,M> {
public:
eye_rep (const solver_option& opt = solver_option());
void update_values (const csr<T,M>&) {}
vec<T,M> operator* (const vec<T,M>& x) const { return x; }
vec<T,M> solve (const vec<T,M>& x) const { return x; }
vec<T,M> trans_solve (const vec<T,M>& x) const { return x; }
};
Releases
4 releases since Debian 7 (Wheezy); the text changed 3 times.