.\" .de Id .. .de Sp .if n .sp .if t .sp 0.4 .. .TH eye 2rheolef "rheolef-7.0" "rheolef-7.0" "rheolef-7.0" .\" label: /*Class:eye .SH NAME \fBeye\fP - the identity matrix .SH DESCRIPTION Following \fBoctave\fP, the name \fBeye_rep\fP 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 \fBeye_rep\fP 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. .\" begin_example .Sp .nf int status = cg (a, x, b, eye_rep(), 100, 1e-7); .Sp .fi .\" end_example .\" skip start:AUTHOR: .\" skip start:DATE: .\" END .SH IMPLEMENTATION .\" begin_example .Sp .nf template class eye_rep : public solver_abstract_rep { public: eye_rep (const solver_option& opt = solver_option()); void update_values (const csr&) {} vec operator* (const vec& x) const { return x; } vec solve (const vec& x) const { return x; } vec trans_solve (const vec& x) const { return x; } }; .Sp .fi .\" end_example .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.