MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
normest1.hpp File Reference
#include <algorithm>
#include <complex>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <random>
#include <stdexcept>
#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/operation/mult.hpp>
#include <mtl/operation/norms.hpp>
#include <mtl/detail/complex_qr.hpp>

Classes

struct  mtl::detail::normest1_impl::real_of< T >
struct  mtl::detail::normest1_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::normest1_impl

Functions

template<typename T>
real_of< T >::type mtl::detail::normest1_impl::mag (const T &x)
template<typename T>
T mtl::detail::normest1_impl::sign_of (const T &y)
 sign(y): y / |y|, and 1 for y = 0.
template<typename T>
real_of< T >::type mtl::detail::normest1_impl::column_one_norm (const mat::dense2D< T > &Y, std::size_t j)
template<typename T>
bool mtl::detail::normest1_impl::parallel (const mat::dense2D< T > &S, std::size_t a, const mat::dense2D< T > &S2, std::size_t b)
 Whether columns a of S and b of S2 are parallel: for real +-1 vectors, equal up to sign, which |s_a .
template<typename T, typename Apply, typename ApplyAdjoint>
detail::normest1_impl::real_of< T >::type mtl::normest1 (std::size_t n, Apply &&apply, ApplyAdjoint &&apply_adjoint, std::size_t t=2, int itmax=5)
 An estimate (a lower bound) of ||A||_1 for the n x n operator A, from apply(X) = A X and apply_adjoint(Y) = A^H Y on n x t blocks (dense2D<T>).
template<FieldMatrix M>
auto mtl::normest1 (const M &A, std::size_t t=2, int itmax=5)
 An estimate (a lower bound) of ||A||_1 for a square matrix, from products with A and A^H; see the operator overload.