MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
factorization_properties.hpp File Reference
#include <cmath>
#include <vector>
#include <mtl/concepts/matrix.hpp>
#include <mtl/concepts/magnitude.hpp>
#include <mtl/math/identity.hpp>
#include <mtl/operation/cholesky.hpp>
#include <mtl/operation/lu.hpp>
#include <mtl/operation/matrix_properties.hpp>

Namespaces

namespace  mtl

Functions

template<Matrix M>
bool mtl::is_spd (const M &A, magnitude_t< typename M::value_type > sym_tol=magnitude_t< typename M::value_type >(0))
 Symmetric positive definite: A is symmetric (within sym_tol, default exact) and its Cholesky factorization exists (every pivot strictly positive).
template<Matrix M>
bool mtl::is_positive_definite (const M &A, magnitude_t< typename M::value_type > sym_tol=magnitude_t< typename M::value_type >(0))
 Alias for is_spd.
template<Matrix M>
bool mtl::is_singular (const M &A, magnitude_t< typename M::value_type > tol=magnitude_t< typename M::value_type >(0))
 Singular within tol: the LU factorization has a zero pivot, or the smallest |U(k,k)| is <= tol (default 0, i.e.
template<Matrix M>
bool mtl::is_nonsingular (const M &A, magnitude_t< typename M::value_type > tol=magnitude_t< typename M::value_type >(0))
 Complement of is_singular.
template<Matrix M>
bool mtl::is_invertible (const M &A, magnitude_t< typename M::value_type > tol=magnitude_t< typename M::value_type >(0))
 Alias for is_nonsingular.
template<Matrix M>
M::value_type mtl::determinant (const M &A)
 Determinant via LU: sign(permutation) * product of U(k,k).