19 Vreal(M.rows(), M.columns()),
20 V(M.rows(), M.columns()),
24 assert(n == (
int)(M.
columns()));
36 v3p_netlib_rg_(&n, &n, mf,
43 std::cerr <<
" *** vnl_real_eigensystem: Failed on " << ierr <<
"th eigenvalue\n" 48 for (
int c = 0; c < n; ++c) {
49 D(c,c) = std::complex<double>(wr[c], wi[c]);
52 D(c+1, c+1) = std::complex<double>(wr[c], -wi[c]);
53 for (
int r = 0; r < n; ++r) {
54 V(r, c) = std::complex<double>(devout(c,r), devout(c+1,r));
55 V(r, c+1) = std::complex<double>(devout(c,r), -devout(c+1,r));
61 for (
int r = 0; r < n; ++r) {
62 V(r, c) = std::complex<double>(devout(c,r), 0);
63 Vreal(r,c) = devout(c,r);
vnl_real_eigensystem(vnl_matrix< double > const &M)
Extract eigensystem of non-symmetric matrix M, using the EISPACK routine rg.
vnl_matrix< std::complex< double > > V
Output matrix of eigenvectors, which will in general be complex.
T const * data_block() const
Access the contiguous block storing the elements in the vector. O(1).
vnl_diag_matrix< std::complex< double > > D
Output diagonal matrix of eigenvalues.
vnl_matrix< double > Vreal
Convert row-stored matrix to column-stored.
Declare in a central place the list of symbols from netlib.
Convert row-stored matrix to column-stored.
T const * data_block() const
Access the contiguous block storing the elements in the matrix row-wise. O(1).
unsigned int rows() const
Return the number of rows.
Extract eigensystem of non-symmetric matrix M, using EISPACK.
unsigned int columns() const
Return the number of columns.