|
| template<typename Mag, typename ForEachAbs> |
| Mag | mtl::detail::norms_adl::rescaled_two_norm (ForEachAbs &&for_each_abs) |
| | sqrt(sum a^2) over the magnitudes that for_each_abs(f) passes to f, computed with a power-of-two scale so that neither the squares nor their sum overflow or underflow.
|
| template<typename Mag> |
| bool | mtl::detail::sum_squares_needs_rescan (const Mag &ss) |
| template<typename Mag> |
| void | mtl::detail::max_propagating_nan (Mag &result, const Mag &a) |
| | result = max(result, a), but a NaN a makes the result NaN and keeps it there (#690).
|
| template<Vector V> |
| auto | mtl::one_norm (const V &v) |
| | one_norm(v) = sum(|v[i]|)
|
| template<typename Accumulator = void, typename Result = void, Vector V> |
| auto | mtl::two_norm (const V &v) |
| | two_norm(v) = sqrt(sum(|v[i]|^2)).
|
| template<Vector V> |
| auto | mtl::infinity_norm (const V &v) |
| | infinity_norm(v) = max(|v[i]|)
|
| template<typename M, typename F> |
| void | mtl::detail::for_each_entry (const M &m, F &&f) |
| | Calls f(r, c, a) for every element a = m(r, c) that can be nonzero, in an order that suits the storage: a compressed2D's stored entries row by row (its operator() is a binary search, so the full m x n loop was O(m n log
nnz) for an O(nnz) answer); a column-major matrix column by column; any other matrix row by row.
|
| template<typename Accumulator = void, typename Result = void, Matrix M> |
| auto | mtl::frobenius_norm (const M &m) |
| | frobenius_norm(m) = sqrt(sum(|m[i,j]|^2)).
|
| template<Matrix M> |
| auto | mtl::one_norm (const M &m) |
| | one_norm(m) = max column sum of |m[i,j]|
|
| template<Matrix M> |
| auto | mtl::infinity_norm (const M &m) |
| | infinity_norm(m) = max row sum of |m[i,j]|
|
| template<typename Mag, typename ForEachAbs> |
| Mag | mtl::detail::rescaled_two_norm (ForEachAbs &&for_each_abs) |
| | sqrt(sum a^2) over the magnitudes that for_each_abs(f) passes to f, computed with a power-of-two scale so that neither the squares nor their sum overflow or underflow.
|