10#ifndef TLAPACK_HASINF_HH 
   11#define TLAPACK_HASINF_HH 
   41template <TLAPACK_UPLO uplo_t, TLAPACK_MATRIX matrix_t>
 
   47    const idx_t m = nrows(
A);
 
   48    const idx_t n = ncols(
A);
 
   56        for (idx_t j = 0; j < n; ++j)
 
   57            for (idx_t i = 0; i < ((j < m) ? j + 2 : m); ++i)
 
   58                if (
isinf(
A(i, j))) 
return true;
 
   62        for (idx_t j = 0; j < n; ++j)
 
   63            for (idx_t i = 0; i < ((j < m) ? j + 1 : m); ++i)
 
   64                if (
isinf(
A(i, j))) 
return true;
 
   68        for (idx_t j = 0; j < n; ++j)
 
   69            for (idx_t i = 0; i < ((j < m) ? j : m); ++i)
 
   70                if (
isinf(
A(i, j))) 
return true;
 
   74        for (idx_t j = 0; j < n; ++j)
 
   75            for (idx_t i = ((j > 1) ? j - 1 : 0); i < m; ++i)
 
   76                if (
isinf(
A(i, j))) 
return true;
 
   80        for (idx_t j = 0; j < n; ++j)
 
   81            for (idx_t i = j; i < m; ++i)
 
   82                if (
isinf(
A(i, j))) 
return true;
 
   86        for (idx_t j = 0; j < n; ++j)
 
   87            for (idx_t i = j + 1; i < m; ++i)
 
   88                if (
isinf(
A(i, j))) 
return true;
 
   93        for (idx_t j = 0; j < n; ++j)
 
   94            for (idx_t i = 0; i < m; ++i)
 
   95                if (
isinf(
A(i, j))) 
return true;
 
 
  108template <TLAPACK_MATRIX matrix_t>
 
  114    const idx_t m = nrows(
A);
 
  115    const idx_t n = ncols(
A);
 
  119    for (idx_t j = 0; j < n; ++j)
 
  120        for (idx_t i = ((j >= ku) ? (j - ku) : 0); i < min(m, j + kl + 1); ++i)
 
  121            if (
isinf(
A(i, j))) 
return true;
 
 
  135template <TLAPACK_VECTOR vector_t>
 
  141    const idx_t n = size(
x);
 
  143    for (idx_t i = 0; i < n; ++i)
 
  144        if (
isinf(
x[i])) 
return true;
 
 
#define tlapack_check(cond)
Throw an error if cond is false.
Definition exceptionHandling.hpp:98
bool hasinf(uplo_t uplo, const matrix_t &A)
Returns true if and only if A has an infinite entry.
Definition hasinf.hpp:42
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
@ General
0 <= i <= m, 0 <= j <= n.
@ Upper
0 <= i <= j, 0 <= j <= n.
@ StrictLower
0 <= i <= m, 0 <= j <= i-1.
@ Lower
0 <= i <= m, 0 <= j <= i.
@ StrictUpper
0 <= i <= j-1, 0 <= j <= n.
@ UpperHessenberg
0 <= i <= j+1, 0 <= j <= n.
@ LowerHessenberg
0 <= i <= m, 0 <= j <= i+1.
constexpr bool isinf(const T &x) noexcept
Extends std::isinf() to complex numbers.
Definition utils.hpp:117
Band access.
Definition types.hpp:432