17template <SquareMatrix Mat,
typename Derived>
29 static constexpr std::size_t
DIM = (
N * (
N + 1)) / 2;
60 constexpr std::size_t
index(std::size_t
i, std::size_t
j)
const {
62 "SymmetricOperator index expects row/col inside [0, N)");
63 if (
i >=
j)
return i * (
i + 1) / 2 +
j;
64 return j * (
j + 1) / 2 +
i;
122 template <
typename DiagT>
constexpr auto get_svec(const Mat &A)
get svec encoding of a symmetric matrix
SymmetricOperatorType
simple enum to define symmetric matrix types INV = Invalid IND = Indefinite PSD = Positive Semidefini...
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.
Endomorphism operator CRTP base.
std::complex< ScalarT > ComplexT
matrix_scalar_t< Mat > T
alias helpers for types
static constexpr std::size_t N
helper to extract N
forward declaration for symmetric operator
constexpr auto operator()(std::size_t i, std::size_t j) const
get element at (i,j) index
constexpr bool is_ind() const
is indefinite
constexpr SymmetricOperator(const Mat &A)
CTOR.
constexpr bool is_nd() const
is nd check
static constexpr std::size_t DIM
helpers to get DIM from mat
SymmetricOperatorType type
member variables
constexpr bool is_pd() const
is pd check
constexpr std::size_t index(std::size_t i, std::size_t j) const
index from (row, col)
constexpr bool is_psd() const
is psd check
constexpr void compute_definiteness(const Vector< DiagT, N > &diag, const ScalarT &tol)
compute definiteness
constexpr bool is_nsd() const
is nsd check
constexpr const Derived & self() const
self
constexpr bool is_valid() const
is valid
Owning, fixed-size vector container.