MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
idr_s.hpp File Reference
#include <mtl/detail/exceptions.hpp>
#include <mtl/concepts/vector.hpp>
#include <complex>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <random>
#include <stdexcept>
#include <type_traits>
#include <vector>
#include <mtl/vec/dense_vector.hpp>
#include <mtl/mat/dense2D.hpp>
#include <mtl/operation/dot.hpp>
#include <mtl/operation/norms.hpp>
#include <mtl/operation/mult.hpp>
#include <mtl/itl/krylov/apply_operator.hpp>
#include <mtl/itl/krylov/scaled_rhs.hpp>
#include <mtl/concepts/matrix.hpp>
#include <mtl/math/identity.hpp>

Classes

struct  mtl::itl::idrs_options
 Options of idr_s (issue 874). More...
struct  mtl::itl::detail::idrs_is_complex< T >
struct  mtl::itl::detail::idrs_is_complex< std::complex< T > >

Namespaces

namespace  mtl
namespace  mtl::itl
namespace  mtl::itl::detail

Functions

template<typename Accumulator, typename Value>
void mtl::itl::detail::idrs_orthonormalize (std::vector< vec::dense_vector< Value > > &P)
 Orthonormalize P in place (modified Gram-Schmidt, run twice, which keeps P orthonormal to working precision).
template<typename Value>
std::vector< vec::dense_vector< Value > > mtl::itl::detail::idrs_random_shadow (std::size_t n, std::size_t s, std::uint64_t seed)
 s vectors of length n with entries uniform in [-1, 1), drawn from seed in the value type itself: 24-bit integers scaled by 2^-23, exact in any type with a 24-bit significand, with no detour through double.
template<typename Accumulator = void, typename LinearOp, typename VecX, typename VecB, typename PC, typename Iter>
requires FieldVector<VecX>
int mtl::itl::idr_s (const LinearOp &A, VecX &x, const VecB &b, const PC &M, Iter &iter, const idrs_options &opt, std::vector< vec::dense_vector< typename VecX::value_type > > P)
 IDR(s) for nonsymmetric systems A x = b, right preconditioned by M, with the shadow space P given: s = P.size() vectors of length n, of full rank.
template<typename Accumulator = void, typename LinearOp, typename VecX, typename VecB, typename PC, typename Iter>
requires FieldVector<VecX>
int mtl::itl::idr_s (const LinearOp &A, VecX &x, const VecB &b, const PC &M, Iter &iter, const idrs_options &opt)
 IDR(s) with the options in opt and a random shadow space drawn from opt.seed (see idrs_options).
template<typename Accumulator = void, typename LinearOp, typename VecX, typename VecB, typename PC, typename Iter>
requires FieldVector<VecX>
int mtl::itl::idr_s (const LinearOp &A, VecX &x, const VecB &b, const PC &M, Iter &iter, typename VecX::size_type s=4)
 IDR(s) with shadow space dimension s and the default options.