akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
linalg::Fro< Mat > Struct Template Reference

compute the frobenius norm of a matrix More...

#include <matrix_norms.hpp>

Public Types

using domain_type = remove_cvref_t< Mat >
 
using scalar_type = matrix_scalar_t< domain_type >
 
using codomain_type = real_type_t< scalar_type >
 

Public Member Functions

constexpr codomain_type operator() (const domain_type &matrix) const
 

Detailed Description

template<MatrixContainer Mat>
struct linalg::Fro< Mat >

compute the frobenius norm of a matrix

sqrt(tr(A^T A)) if A in R else sqrt(tr(A^* A)) where A in C

Parameters
matrixA Rows x Cols elements of type T (must be square)
Returns
scalar

Definition at line 24 of file matrix_norms.hpp.

Member Typedef Documentation

◆ codomain_type

template<MatrixContainer Mat>
using linalg::Fro< Mat >::codomain_type = real_type_t<scalar_type>

Definition at line 27 of file matrix_norms.hpp.

◆ domain_type

template<MatrixContainer Mat>
using linalg::Fro< Mat >::domain_type = remove_cvref_t<Mat>

Definition at line 25 of file matrix_norms.hpp.

◆ scalar_type

template<MatrixContainer Mat>
using linalg::Fro< Mat >::scalar_type = matrix_scalar_t<domain_type>

Definition at line 26 of file matrix_norms.hpp.

Member Function Documentation

◆ operator()()

template<MatrixContainer Mat>
constexpr codomain_type linalg::Fro< Mat >::operator() ( const domain_type &  matrix) const
inlineconstexpr

Definition at line 29 of file matrix_norms.hpp.

References linalg::constexpr_sqrt_safe(), and linalg::mat_rows_v.


The documentation for this struct was generated from the following file: