12#ifndef TLAPACK_LANSY_HH
13#define TLAPACK_LANSY_HH
42template <TLAPACK_NORM norm_t, TLAPACK_UPLO uplo_t, TLAPACK_SMATRIX matrix_t>
51 const idx_t n = nrows(
A);
59 if (n <= 0)
return real_t(0);
65 if (
uplo == Uplo::Upper) {
66 for (idx_t j = 0; j < n; ++j) {
67 for (idx_t i = 0; i <= j; ++i) {
79 for (idx_t j = 0; j < n; ++j) {
80 for (idx_t i = j; i < n; ++i) {
93 if (
uplo == Uplo::Upper) {
94 for (idx_t j = 0; j < n; ++j) {
97 for (idx_t i = 0; i <= j; ++i)
100 for (idx_t i = j + 1; i < n; ++i)
101 temp += abs(
A(j, i));
111 for (idx_t j = 0; j < n; ++j) {
114 for (idx_t i = 0; i <= j; ++i)
115 temp += abs(
A(j, i));
117 for (idx_t i = j + 1; i < n; ++i)
118 temp += abs(
A(i, j));
133 if (
uplo == Uplo::Upper) {
134 for (idx_t j = 1; j < n; ++j)
138 for (idx_t j = 0; j < n - 1; ++j)
constexpr bool isnan(const T &x) noexcept
Extends std::isnan() to complex numbers.
Definition utils.hpp:125
constexpr auto diag(T &A, int diagIdx=0) noexcept
Get the Diagonal of an Eigen Matrix.
Definition eigen.hpp:576
auto lansy(norm_t normType, uplo_t uplo, const matrix_t &A)
Calculates the norm of a symmetric matrix.
Definition lansy.hpp:43
void lassq(const vector_t &x, real_type< type_t< vector_t > > &scale, real_type< type_t< vector_t > > &sumsq, abs_f absF)
Updates a sum of squares represented in scaled form.
Definition lassq.hpp:49
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
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