| 2213 | */ |
| 2214 | template<typename complextyp, typename typ> |
| 2215 | static inline void |
| 2216 | mk_geev_complex_eigenvectors(complextyp *c, |
| 2217 | const typ *r, |
| 2218 | const typ *i, |
| 2219 | size_t n) |
| 2220 | { |
| 2221 | size_t iter = 0; |
| 2222 | while (iter < n) |
| 2223 | { |
| 2224 | if (i[iter] == numeric_limits<typ>::zero) { |
| 2225 | /* eigenvalue was real, eigenvectors as well... */ |
| 2226 | mk_complex_array_from_real(c, r, n); |
| 2227 | c += n; |
| 2228 | r += n; |
| 2229 | iter ++; |
| 2230 | } else { |
| 2231 | /* eigenvalue was complex, generate a pair of eigenvectors */ |
| 2232 | mk_complex_array_conjugate_pair(c, r, n); |
| 2233 | c += 2*n; |
| 2234 | r += 2*n; |
| 2235 | iter += 2; |
| 2236 | } |
| 2237 | } |
| 2238 | } |
| 2239 | |
| 2240 | |
| 2241 | template<typename complextyp, typename typ> |
no test coverage detected