<T>LAPACK 0.1.2
C++ Template Linear Algebra PACKage
Loading...
Searching...
No Matches
lanhe.hpp
Go to the documentation of this file.
1
3//
4// Copyright (c) 2025, University of Colorado Denver. All rights reserved.
5//
6// This file is part of <T>LAPACK.
7// <T>LAPACK is free software: you can redistribute it and/or modify it under
8// the terms of the BSD 3-Clause license. See the accompanying LICENSE file.
9
10#ifndef TLAPACK_LEGACY_LANHE_HH
11#define TLAPACK_LEGACY_LANHE_HH
12
15
16namespace tlapack {
17namespace legacy {
18
42 template <class norm_t, typename TA>
44 norm_t normType, Uplo uplo, idx_t n, const TA* A, idx_t lda)
45 {
46 using internal::create_matrix;
47
48 // check arguments
52
53 // quick return
54 if (n == 0) return 0;
55
56 // Matrix views
57 auto A_ = create_matrix<TA>((TA*)A, n, n, lda);
58
59 return lanhe(normType, uplo, A_);
60 }
61
62} // namespace legacy
63} // namespace tlapack
64
65#endif // TLAPACK_LEGACY_LANHE_HH
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
real_type< TA > lanhe(norm_t normType, Uplo uplo, idx_t n, const TA *A, idx_t lda)
Calculates the value of the one norm, Frobenius norm, infinity norm, or element of largest absolute v...
Definition lanhe.hpp:43
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
Uplo
Definition types.hpp:50
@ Upper
0 <= i <= j, 0 <= j <= n.
@ Lower
0 <= i <= m, 0 <= j <= i.
@ Inf
infinity norm of matrices
@ One
one norm
@ Max
max norm
@ Fro
Frobenius norm of matrices.