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

forward declaration for a matrix More...

#include <symmetric_matrix.hpp>

Inheritance diagram for linalg::SymmetricMatrix< Mat >:
[legend]

Public Types

using SymmetricBase = SymmetricOperator< Mat, SymmetricMatrix< Mat > >
 alias for symmetric matrix
 
- Public Types inherited from linalg::SymmetricOperator< Mat, SymmetricMatrix< Mat > >
using OperatorBase = Endomorphism< Mat, SymmetricOperator< Mat, SymmetricMatrix< Mat > > >
 alias to extract base types
 
- Public Types inherited from linalg::Endomorphism< Mat, Derived >
using T = matrix_scalar_t< Mat >
 alias helpers for types
 
using ScalarT = real_type_t< T >
 
using ComplexT = std::complex< ScalarT >
 

Public Member Functions

constexpr SymmetricMatrix (const Mat &A, ScalarT tol=1e-8)
 CTOR.
 
- Public Member Functions inherited from linalg::SymmetricOperator< Mat, SymmetricMatrix< Mat > >
constexpr SymmetricOperator (const Mat &A)
 CTOR.
 
constexpr auto operator() (std::size_t i, std::size_t j) const
 get element at (i,j) index
 
constexpr std::size_t index (std::size_t i, std::size_t j) const
 index from (row, col)
 
constexpr bool is_pd () const
 is pd check
 
constexpr bool is_nd () const
 is nd check
 
constexpr bool is_psd () const
 is psd check
 
constexpr bool is_nsd () const
 is nsd check
 
constexpr bool is_ind () const
 is indefinite
 
constexpr bool is_valid () const
 is valid
 
constexpr void compute_definiteness (const Vector< DiagT, N > &diag, const ScalarT &tol)
 compute definiteness
 
constexpr const SymmetricMatrix< Mat > & self () const
 self
 
- Public Member Functions inherited from linalg::Endomorphism< Mat, Derived >
constexpr const T & operator() (std::size_t i, std::size_t j) const
 get element at (i,j) index
 
constexpr T & operator() (std::size_t i, std::size_t j)
 get element at (i,j) index
 
constexpr Derived & self ()
 self
 
constexpr const Derived & self () const
 self
 

Additional Inherited Members

- Public Attributes inherited from linalg::SymmetricOperator< Mat, SymmetricMatrix< Mat > >
SymmetricOperatorType type
 member variables
 
Vector< T, DIM > svec
 
- Static Public Attributes inherited from linalg::SymmetricOperator< Mat, SymmetricMatrix< Mat > >
static constexpr std::size_t DIM
 helpers to get DIM from mat
 
- Static Public Attributes inherited from linalg::Endomorphism< Mat, Derived >
static constexpr std::size_t N = mat_rows_v<Mat>
 helper to extract N
 

Detailed Description

template<SquareMatrix Mat>
struct linalg::SymmetricMatrix< Mat >

forward declaration for a matrix

SymmetricMatrix definition.

This class depends on square like matrix type and tests if it's symmetric (A = A^T or A = A^H) then stores in reduced flattend vector for look up

Definition at line 21 of file symmetric_matrix.hpp.

Member Typedef Documentation

◆ SymmetricBase

template<SquareMatrix Mat>
using linalg::SymmetricMatrix< Mat >::SymmetricBase = SymmetricOperator<Mat, SymmetricMatrix<Mat> >

alias for symmetric matrix

Definition at line 23 of file symmetric_matrix.hpp.

Constructor & Destructor Documentation

◆ SymmetricMatrix()

template<SquareMatrix Mat>
constexpr linalg::SymmetricMatrix< Mat >::SymmetricMatrix ( const Mat &  A,
ScalarT  tol = 1e-8 
)
inlineexplicitconstexpr

CTOR.

Creates symmetric matrix with matrix A type T N x N elements

  • Checks if A is symmetric and sets data elements to vector with N * (N + 1) / 2 elements
  • Checks eigenvalue signs and sets type

Definition at line 40 of file symmetric_matrix.hpp.

References linalg::mat_rows_v.


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