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

Matrix sqrt (X^{1/2}) More...

#include <matrix_sqrt.hpp>

Public Types

using Mat = linalg::remove_cvref_t< MatIn >
 alias & types
 
using T = matrix_scalar_t< Mat >
 

Public Member Functions

constexpr auto operator() (const Mat &A) const
 Compute the matrix square root and inverse square root.
 
constexpr auto apply (const Mat &A) const
 Compute the matrix square root and inverse square root.
 

Public Attributes

config::FactorConfig< T > config
 member vars
 

Static Public Attributes

static constexpr std::size_t N = mat_rows_v<Mat>
 

Detailed Description

template<SquareMatrix MatIn>
struct linalg::MatrixSqrt< MatIn >

Matrix sqrt (X^{1/2})

Template Parameters
MatInReal square matrix type.

Definition at line 20 of file matrix_sqrt.hpp.

Member Typedef Documentation

◆ Mat

template<SquareMatrix MatIn>
using linalg::MatrixSqrt< MatIn >::Mat = linalg::remove_cvref_t<MatIn>

alias & types

Definition at line 22 of file matrix_sqrt.hpp.

◆ T

template<SquareMatrix MatIn>
using linalg::MatrixSqrt< MatIn >::T = matrix_scalar_t<Mat>

Definition at line 23 of file matrix_sqrt.hpp.

Member Function Documentation

◆ apply()

template<SquareMatrix MatIn>
constexpr auto linalg::MatrixSqrt< MatIn >::apply ( const Mat &  A) const
inlineconstexpr

Compute the matrix square root and inverse square root.

Parameters
[in]AReal square input matrix for Denman-Beavers iteration.
Returns
Tuple (Mat root, Mat inverse_root, NumericalEvent event).

Definition at line 43 of file matrix_sqrt.hpp.

References linalg::all_equal(), linalg::DB_MAX_ITERS_REACHED, linalg::mat_rows_v, and linalg::NONE.

Referenced by linalg::MatrixSqrt< MatIn >::operator()().

◆ operator()()

template<SquareMatrix MatIn>
constexpr auto linalg::MatrixSqrt< MatIn >::operator() ( const Mat &  A) const
inlineconstexpr

Compute the matrix square root and inverse square root.

Parameters
[in]AReal square input matrix for Denman-Beavers iteration.
Returns
Tuple (Mat root, Mat inverse_root, NumericalEvent event).

Definition at line 35 of file matrix_sqrt.hpp.

References linalg::MatrixSqrt< MatIn >::apply(), and linalg::mat_rows_v.

Member Data Documentation

◆ config

template<SquareMatrix MatIn>
config::FactorConfig<T> linalg::MatrixSqrt< MatIn >::config
Initial value:
{
.steps = 128, .tol = T(1e-12), .floor_eps = T(1e-14)}
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.
matrix_scalar_t< Mat > T

member vars

factor config

Definition at line 73 of file matrix_sqrt.hpp.

◆ N

template<SquareMatrix MatIn>
constexpr std::size_t linalg::MatrixSqrt< MatIn >::N = mat_rows_v<Mat>
staticconstexpr

Definition at line 24 of file matrix_sqrt.hpp.


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