MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
frechet.hpp File Reference
#include <cstddef>
#include <limits>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <mtl/concepts/matrix.hpp>
#include <mtl/concepts/scalar.hpp>
#include <mtl/concepts/magnitude.hpp>
#include <mtl/mat/dense2D.hpp>
#include <mtl/math/pow2_scaling.hpp>
#include <mtl/operation/expm.hpp>
#include <mtl/operation/logm.hpp>
#include <mtl/operation/sqrtm.hpp>
#include <mtl/operation/sylvester.hpp>
#include <mtl/operation/normest1.hpp>

Classes

struct  mtl::frechet_result< T >
 f(A) and its Frechet derivative L_f(A, E), as returned by expm_frechet, logm_frechet and sqrtm_frechet. More...
struct  mtl::detail::frechet_impl::real_of< T >
struct  mtl::detail::frechet_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::frechet_impl

Functions

template<typename M>
real_of< typenameM::value_type >::type mtl::detail::frechet_impl::one_norm (const M &A)
template<typename R>
int mtl::detail::frechet_impl::balance_exponent (const R &na, const R &ne)
 The exponent k of the power of two 2^k that brings ||E||_1 to ||A||_1, or 0 when either is zero.
template<typename T>
T mtl::detail::frechet_impl::scale_pow2 (const T &x, int k)
template<typename MA, typename ME>
void mtl::detail::frechet_impl::check_pair (const MA &A, const ME &E, const char *who)
template<typename T>
bool mtl::detail::frechet_impl::all_finite (const mat::dense2D< T > &X)
template<typename F, typename MA, typename ME>
auto mtl::detail::frechet_impl::block_frechet_at (F &f, const MA &A, const ME &E, int k)
 f([A 2^k E; 0 A]): f(A), and L_f(A, E) scaled back by 2^-k.
template<typename F, typename MA, typename ME>
auto mtl::detail::frechet_impl::block_frechet (F &&f, const MA &A, const ME &E)
 f(A) and L_f(A, E) from f([A cE; 0 A]) with c = 2^k balancing E against A.
template<typename T>
mat::dense2D< T > mtl::detail::frechet_impl::adjoint_of (const mat::dense2D< T > &A)
template<typename T, typename Deriv>
real_of< T >::type mtl::detail::frechet_impl::cond_estimate (const mat::dense2D< T > &A, const mat::dense2D< T > &FA, Deriv &&deriv)
 The 1-norm relative condition number estimate of Higham (2008, Sec.
template<typename Accumulator = void, FieldMatrix MA, FieldMatrix ME>
auto mtl::expm_frechet (const MA &A, const ME &E)
 exp(A) and the Frechet derivative L_exp(A, E), by expm on [A E; 0 A].
template<typename Accumulator = void, FieldMatrix MA, FieldMatrix ME>
auto mtl::logm_frechet (const MA &A, const ME &E)
 log(A) and the Frechet derivative L_log(A, E), by logm on [A E; 0 A].
template<typename Accumulator = void, FieldMatrix MA, FieldMatrix ME>
auto mtl::sqrtm_frechet (const MA &A, const ME &E)
 sqrt(A) and the Frechet derivative L_sqrt(A, E): X = sqrtm(A), and L solves X L + L X = E.
template<typename Accumulator = void, FieldMatrix M>
auto mtl::expm_cond (const M &A)
 An estimate of the relative condition number of exp at A in the 1-norm, ||L_exp(A)|| ||A|| / ||exp(A)|| (Higham 2008, Sec.
template<typename Accumulator = void, FieldMatrix M>
auto mtl::logm_cond (const M &A)
 An estimate of the relative condition number of log at A in the 1-norm.
template<typename Accumulator = void, FieldMatrix M>
auto mtl::sqrtm_cond (const M &A)
 An estimate of the relative condition number of the principal square root at A in the 1-norm.