MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
spectral_properties.hpp File Reference
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstddef>
#include <limits>
#include <vector>
#include <mtl/concepts/matrix.hpp>
#include <mtl/concepts/magnitude.hpp>
#include <mtl/operation/svd.hpp>
#include <mtl/operation/eigenvalue.hpp>
#include <mtl/operation/eigenvalue_symmetric.hpp>

Classes

struct  mtl::inertia_t
 Inertia of a symmetric matrix: the counts (positive, negative, zero) of its eigenvalues. More...

Namespaces

namespace  mtl
namespace  mtl::detail
 mat*vec multiply into pre-allocated y: y = A * x.

Functions

template<Matrix M>
std::vector< magnitude_t< typename M::value_type > > mtl::detail::singular_values (const M &A)
template<Matrix M>
magnitude_t< typename M::value_type > mtl::spectral_radius (const M &A)
 Spectral radius: max |eigenvalue|.
template<Matrix M>
magnitude_t< typename M::value_type > mtl::condition_number (const M &A)
 2-norm condition number sigma_max / sigma_min.
template<Matrix M>
magnitude_t< typename M::value_type > mtl::rcond (const M &A)
 Reciprocal 2-norm condition number sigma_min / sigma_max, in [0, 1] (0 for a rank-deficient or zero matrix).
template<Matrix M>
std::size_t mtl::numerical_rank (const M &A, magnitude_t< typename M::value_type > tol=magnitude_t< typename M::value_type >(-1))
 Numerical rank: number of singular values above a threshold.
template<Matrix M>
std::size_t mtl::nullity (const M &A, magnitude_t< typename M::value_type > tol=magnitude_t< typename M::value_type >(-1))
 Nullity: dimension of the null space = num_cols - numerical_rank.
template<Matrix M>
inertia_t mtl::inertia (const M &A, magnitude_t< typename M::value_type > tol=magnitude_t< typename M::value_type >(-1))
template<Matrix M>
bool mtl::is_indefinite (const M &A, magnitude_t< typename M::value_type > tol=magnitude_t< typename M::value_type >(-1))
 Indefinite: a symmetric matrix with both positive and negative eigenvalues.