|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
#include <array>#include <cmath>#include <complex>#include <cstddef>#include <cstdint>#include <limits>#include <stdexcept>#include <string>#include <type_traits>#include <vector>#include <mtl/concepts/matrix.hpp>#include <mtl/concepts/scalar.hpp>#include <mtl/concepts/magnitude.hpp>#include <mtl/mat/dense2D.hpp>#include <mtl/vec/dense_vector.hpp>#include <mtl/math/pow2_scaling.hpp>#include <mtl/operation/norms.hpp>#include <mtl/operation/normest1.hpp>#include <mtl/detail/unit_roundoff.hpp>Classes | |
| struct | mtl::detail::expm_multiply_impl::theta_row |
| theta_m for m = 1..55 at unit roundoff u = 2^-t, generated by tools/expm_multiply_theta.py and rounded toward zero. More... | |
| struct | mtl::detail::expm_multiply_impl::real_of< T > |
| struct | mtl::detail::expm_multiply_impl::real_of< std::complex< R > > |
Namespaces | |
| namespace | mtl |
| namespace | mtl::detail |
| mat*vec multiply into pre-allocated y: y = A * x. | |
| namespace | mtl::detail::expm_multiply_impl |
Functions | |
| template<typename R> | |
| std::size_t | mtl::detail::expm_multiply_impl::table_index () |
| template<typename R> | |
| R | mtl::detail::expm_multiply_impl::nth_root (const R &x, int p) |
| x^(1/p) for x >= 0, by Newton's method from a power-of-two start. | |
| template<typename R> | |
| std::int64_t | mtl::detail::expm_multiply_impl::ceil_at_least_one (const R &q) |
| The smallest integer k >= 1 with k >= q, q >= 0: by doubling and bisection in R, so a type without a conversion to double works too. | |
| template<typename T> | |
| real_of< T >::type | mtl::detail::expm_multiply_impl::mag (const T &x) |
| template<typename T> | |
| real_of< T >::type | mtl::detail::expm_multiply_impl::inf_norm (const mat::dense2D< T > &Y) |
| ||Y||_inf: the largest row sum of |y_ij|. | |
| template<typename M, typename T> | |
| mat::dense2D< T > | mtl::detail::expm_multiply_impl::apply_shifted (const M &A, const T &mu, const T &c, const mat::dense2D< T > &X, bool adjoint) |
| Y = c (A - mu I) X (or its adjoint), from A's stored entries. | |
| template<typename T> | |
| T | mtl::detail::expm_multiply_impl::scalar_exp (const T &z) |
| exp of a scalar, real or complex, by ADL. | |
| template<Matrix MA, typename V> | |
| mat::dense2D< V > | mtl::expm_multiply (const MA &A, const mat::dense2D< V > &B, const V &t=V(1)) |
| e^{tA} B for a square A (dense or compressed2D) and a dense n x n0 block B, without forming e^{tA}. | |
| template<Matrix MA, typename V> | |
| vec::dense_vector< V > | mtl::expm_multiply (const MA &A, const vec::dense_vector< V > &b, const V &t=V(1)) |
| e^{tA} b for a vector b. | |
Variables | |
| constexpr theta_row | mtl::detail::expm_multiply_impl::theta_table [] |
| constexpr int | mtl::detail::expm_multiply_impl::m_max = 55 |
| constexpr int | mtl::detail::expm_multiply_impl::p_max = 8 |
| constexpr std::int64_t | mtl::detail::expm_multiply_impl::max_steps = std::int64_t(1) << 50 |
| The most steps expm_multiply takes: m s stays far inside an int64_t, and a problem that needs more would not finish anyway. | |