1#ifndef FUSED_ALGORITHMS_NORMS_H
2#define FUSED_ALGORITHMS_NORMS_H
33 template <
typename T, my_
size_t N>
47 if (col_sum > max_col_sum)
49 max_col_sum = col_sum;
67 template <
typename T, my_
size_t N>
70 static_assert(is_floating_point_v<T>,
71 "norm2 requires a floating-point scalar type");
77 sum_sq += v(i) * v(i);
Definition fused_matrix.h:12
Definition fused_vector.h:9
Global configuration for the tesseract tensor library.
#define my_size_t
Size/index type used throughout the library.
Definition config.h:126
constexpr T abs(T x) noexcept
Compute the absolute value of a numeric value.
Definition math_utils.h:48
constexpr T sqrt(T x) noexcept
Compute the square root of a floating-point value.
Definition math_utils.h:29
T norm2(const FusedVector< T, N > &v)
Compute the Euclidean (2-norm) of a vector: √(Σ vᵢ²).
Definition norms.h:68
T norm1(const FusedMatrix< T, N, N > &A)
Compute the 1-norm of a square matrix: max absolute column sum.
Definition norms.h:34