MCPcopy Create free account
hub / github.com/numpy/numpy / mk_geev_complex_eigenvectors

Function mk_geev_complex_eigenvectors

numpy/linalg/umath_linalg.cpp:2215–2238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2213 */
2214template<typename complextyp, typename typ>
2215static inline void
2216mk_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
2241template<typename complextyp, typename typ>

Callers 1

process_geev_resultsFunction · 0.85

Calls 2

Tested by

no test coverage detected