12#ifndef TLAPACK_TREVC_HH
13#define TLAPACK_TREVC_HH
128 const idx_t n = nrows(T);
133 mm = std::min<idx_t>(ncols(
Vl), ncols(
Vr));
143 if (n == 0)
return 0;
155 if (T(j + 1, j) !=
TT(0)) {
193 for (idx_t
ii = 0;
ii < n;
ii++) {
194 idx_t i = n - 1 -
ii;
201 if (T(i, i - 1) !=
TT(0)) {
208 if (T(i + 1, i) !=
TT(0)) {
226 for (idx_t
k = 0;
k < n; ++
k) {
232 for (idx_t
k = 0;
k < n; ++
k) {
251 for (idx_t
k = 0;
k < n; ++
k) {
261 for (idx_t
k = 0;
k < n; ++
k) {
267 for (idx_t
k = 0;
k < n; ++
k) {
284 for (idx_t i = 0; i < n; i++) {
291 if (T(i, i - 1) !=
TT(0)) {
298 if (T(i + 1, i) !=
TT(0)) {
316 for (idx_t
k = 0;
k < n; ++
k) {
322 for (idx_t
k = 0;
k < n; ++
k) {
341 for (idx_t
k = 0;
k < n; ++
k) {
351 for (idx_t
k = 0;
k < n; ++
k) {
357 for (idx_t
k = 0;
k < n; ++
k) {
#define TLAPACK_SIDE
Macro for tlapack::concepts::Side compatible with C++17.
Definition concepts.hpp:927
#define TLAPACK_WORKSPACE
Macro for tlapack::concepts::Workspace compatible with C++17.
Definition concepts.hpp:912
#define TLAPACK_VECTOR
Macro for tlapack::concepts::Vector compatible with C++17.
Definition concepts.hpp:906
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
void gemv(Op trans, const alpha_t &alpha, const matrixA_t &A, const vectorX_t &x, const beta_t &beta, vectorY_t &y)
General matrix-vector multiply:
Definition gemv.hpp:57
#define tlapack_check(cond)
Throw an error if cond is false.
Definition exceptionHandling.hpp:98
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
void trevc_backsolve_double(const matrix_T_t &T, vector_v_t &v_r, vector_v_t &v_i, const size_type< matrix_T_t > k, const vector_colN_t &colN)
Calculate the k-th right eigenvector pair of T using backsubstitution.
Definition trevc_backsolve.hpp:415
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113
void trevc_forwardsolve_double(const matrix_T_t &T, vector_v_t &v_r, vector_v_t &v_i, const size_type< matrix_T_t > k, const vector_colN_t &colN)
Calculate the k-th left eigenvector pair of T using forward substitution.
Definition trevc_forwardsolve.hpp:371
void trevc_forwardsolve_single(const matrix_T_t &T, vector_v_t &v, const size_type< matrix_T_t > k, const vector_colN_t &colN)
Calculate the k-th left eigenvector of T using forward substitution.
Definition trevc_forwardsolve.hpp:73
HowMny
Definition trevc.hpp:23
@ Back
all eigenvectors, backtransformed by input matrix
@ Select
selected eigenvectors
@ Inf
infinity norm of matrices
void trevc_backsolve_single(const matrix_T_t &T, vector_v_t &v, const size_type< matrix_T_t > k, const vector_colN_t &colN)
Calculate the k-th right eigenvector of T using backsubstitution.
Definition trevc_backsolve.hpp:79
void trevc_colnorms(Norm norm, const matrix_T_t &T, vector_colN_t &colN)
Calculate the 1- or infinity-norms of the columns of the strictly upper triangular part of T.
Definition trevc_protect.hpp:506
int trevc(const side_t side, const HowMny howmny, select_t &select, const matrix_T_t &T, matrix_Vl_t &Vl, matrix_Vr_t &Vr, rwork_t &rwork, work_t &work)
TREVC computes some or all of the right and/or left eigenvectors of an upper quasi-triangular matrix ...
Definition trevc.hpp:114