10#ifndef TLAPACK_INFNORM_TR_COLMAJOR_HH 
   11#define TLAPACK_INFNORM_TR_COLMAJOR_HH 
   72    const idx_t m = nrows(
A);
 
   73    const idx_t n = ncols(
A);
 
   76    if (m == 0 || n == 0) 
return real_t(0);
 
   84    for (idx_t i = 0; i < n; ++i)
 
   89            for (idx_t i = 0; i < m; ++i)
 
   92            for (idx_t j = 0; j < n; ++j)
 
   93                for (idx_t i = 0; i <= min(j, m - 1); ++i)
 
   97            for (idx_t i = 0; i < m; ++i)
 
  100            for (idx_t j = 1; j < n; ++j) {
 
  101                for (idx_t i = 0; i < min(j, m); ++i)
 
  102                    w[i] += abs(
A(i, j));
 
  108            for (idx_t i = 0; i < m; ++i)
 
  111            for (idx_t j = 0; j < n; ++j)
 
  112                for (idx_t i = j; i < m; ++i)
 
  113                    w[i] += abs(
A(i, j));
 
  116            for (idx_t i = 0; i < min(m, n); ++i)
 
  118            for (idx_t i = n; i < m; ++i)
 
  121            for (idx_t j = 1; j < n; ++j) {
 
  122                for (idx_t i = j + 1; i < m; ++i)
 
  123                    w[i] += abs(
A(i, j));
 
  128    for (idx_t i = 0; i < m; ++i) {
 
 
  161template <TLAPACK_UPLO uplo_t, TLAPACK_DIAG diag_t, TLAPACK_MATRIX matrix_t>
 
  173    const idx_t m = nrows(
A);
 
  174    const idx_t n = ncols(
A);
 
  177    if (m == 0 || n == 0) 
return real_t(0);
 
  181    std::vector<T> 
work_;
 
 
#define TLAPACK_DIAG
Macro for tlapack::concepts::Diag compatible with C++17.
Definition concepts.hpp:945
#define TLAPACK_UPLO
Macro for tlapack::concepts::Uplo compatible with C++17.
Definition concepts.hpp:942
#define TLAPACK_WORKSPACE
Macro for tlapack::concepts::Workspace compatible with C++17.
Definition concepts.hpp:912
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
auto infnorm_triangular_colmajor(uplo_t uplo, diag_t diag, const matrix_t &A)
Calculates the infinity norm of a column-major triangular matrix.
Definition infnorm_triangular_colmajor.hpp:162
auto infnorm_triangular_colmajor_work(uplo_t uplo, diag_t diag, const matrix_t &A, work_t &work)
Calculates the infinity norm of a column-major triangular matrix.   Workspace is provided as an argum...
Definition infnorm_triangular_colmajor.hpp:57
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
constexpr WorkInfo infnorm_triangular_colmajor_worksize(uplo_t uplo, diag_t diag, const matrix_t &A)
Worspace query of infnorm_triangular_colmajor()
Definition infnorm_triangular_colmajor.hpp:38
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
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
constexpr bool isnan(const T &x) noexcept
Extends std::isnan() to complex numbers.
Definition utils.hpp:125
@ Unit
The main diagonal is assumed to consist of 1's.
@ NonUnit
The main diagonal is not assumed to consist of 1's.
constexpr auto diag(T &A, int diagIdx=0) noexcept
Get the Diagonal of an Eigen Matrix.
Definition eigen.hpp:576
@ Upper
0 <= i <= j, 0 <= j <= n.
@ Lower
0 <= i <= m, 0 <= j <= i.
Output information in the workspace query.
Definition workspace.hpp:16