30 # include <itpp/config.h>
32 # include <itpp/config_msvc.h>
35 #if defined(HAVE_LAPACK)
36 # include <itpp/base/algebra/lapack.h>
45 #if defined(HAVE_LAPACK)
47 bool schur(
const mat &A, mat &U, mat &T)
63 T.set_size(lda, n,
false);
64 U.set_size(ldvs, n,
false);
68 dgees_(&jobvs, &sort, 0, &n, T._data(), &lda, &sdim, wr._data(), wi._data(),
69 U._data(), &ldvs, work._data(), &lwork, 0, &info);
75 bool schur(
const cmat &A, cmat &U, cmat &T)
91 T.set_size(lda, n,
false);
92 U.set_size(ldvs, n,
false);
96 zgees_(&jobvs, &sort, 0, &n, T._data(), &lda, &sdim, w._data(), U._data(),
97 &ldvs, work._data(), &lwork, rwork._data(), 0, &info);
104 bool schur(
const mat &A, mat &U, mat &T)
106 it_error(
"LAPACK library is needed to use schur() function");
111 bool schur(
const cmat &A, cmat &U, cmat &T)
113 it_error(
"LAPACK library is needed to use schur() function");
117 #endif // HAVE_LAPACK