eye(2rheolef) | rheolef-7.0 | eye(2rheolef) |
eye - the identity matrix
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);
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; } };
Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr> GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
rheolef-7.0 | rheolef-7.0 |