Query: eye
OS: debian
Section: 2rheolef
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
eye(2rheolef) rheolef-6.1 eye(2rheolef)NAMEeye - the identity matrixDESCRIPTIONFollowing 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 precondi- tioners, e.g. int status = pcg (a, x, b, eye(), 100, 1e-7);IMPLEMENTATIONclass 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; } }; rheolef-6.1 rheolef-6.1 eye(2rheolef)