---
name: "eye"
section: "2rheolef"
platform: "linux"
package: "librheolef-dev"
version: "7.0-2+b1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/eye"
---

# eye(2rheolef)

the identity matrix

## NAME

**eye** - the identity matrix

## DESCRIPTION

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; }
};

```

## COPYRIGHT

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.
