|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
#include <cmath>#include <concepts>#include <limits>#include <type_traits>#include <mtl/concepts/vector.hpp>#include <mtl/concepts/magnitude.hpp>#include <mtl/operation/norms.hpp>#include <mtl/operation/dot.hpp>Namespaces | |
| namespace | mtl |
| namespace | mtl::detail |
| mat*vec multiply into pre-allocated y: y = A * x. | |
| namespace | mtl::detail::classify_adl |
Concepts | |
| concept | mtl::detail::classify_adl::has_isfinite |
| concept | mtl::detail::classify_adl::has_isnan |
| concept | mtl::detail::classify_adl::has_isinf |
Functions | |
| template<typename T> | |
| bool | mtl::detail::classify_adl::call_isfinite (const T &x) |
| template<typename T> | |
| bool | mtl::detail::classify_adl::call_isnan (const T &x) |
| template<typename T> | |
| bool | mtl::detail::classify_adl::call_isinf (const T &x) |
| template<typename T> | |
| bool | mtl::detail::scalar_is_finite (const T &x) |
| template<typename T> | |
| bool | mtl::detail::scalar_is_nan (const T &x) |
| template<typename T> | |
| bool | mtl::detail::scalar_is_inf (const T &x) |
| template<typename Mag> | |
| constexpr Mag | mtl::default_norm_tol () |
| Default relative tolerance for the norm-based predicates: 128 * eps. | |
| template<Vector V> | |
| bool | mtl::is_zero (const V &v, magnitude_t< typename V::value_type > tol=magnitude_t< typename V::value_type >(0)) |
| Every entry is within tol of zero (default tol 0: exactly zero). | |
| template<Vector V> | |
| bool | mtl::is_finite (const V &v) |
| Every entry is finite (no NaN, no +/-Inf). | |
| template<Vector V> | |
| bool | mtl::has_nan (const V &v) |
| At least one entry is NaN. | |
| template<Vector V> | |
| bool | mtl::has_inf (const V &v) |
| At least one entry is +/-Inf. | |
| template<Vector V> | |
| bool | mtl::is_normalized (const V &v, magnitude_t< typename V::value_type > tol=default_norm_tol< magnitude_t< typename V::value_type > >()) |
| Unit 2-norm within a relative tolerance (default 128 * eps). | |
| template<Vector V> | |
| bool | mtl::is_unit (const V &v, magnitude_t< typename V::value_type > tol=default_norm_tol< magnitude_t< typename V::value_type > >()) |
| Alias for is_normalized. | |
| template<Vector V1, Vector V2> | |
| bool | mtl::is_orthogonal_to (const V1 &u, const V2 &v, magnitude_t< typename V1::value_type > tol=default_norm_tol< magnitude_t< typename V1::value_type > >()) |
| Numerically orthogonal: |<u,v>| <= tol * ||u|| * ||v|| (relative; default tol 128 * eps). | |