MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::generators::ill_conditioned_detail Namespace Reference

Functions

double rand01 (std::mt19937_64 &gen)
 Uniform on [0, 1): the top 53 bits of one 64-bit draw.
int mround (double v)
 Matlab's round: half away from zero.
template<typename A, typename B>
void permute (A &a, B &b, std::mt19937_64 &gen)
 Matlab's randperm applied to a pair of vectors: Fisher-Yates on the raw stream.
template<typename T>
T dot_exact (const vec::dense_vector< T > &x, const vec::dense_vector< T > &y, std::size_t m)
 x(0..m) . y(0..m), exactly, rounded to nearest: the paper's DotExact.

Function Documentation

◆ dot_exact()

template<typename T>
T mtl::generators::ill_conditioned_detail::dot_exact ( const vec::dense_vector< T > & x,
const vec::dense_vector< T > & y,
std::size_t m )

x(0..m) . y(0..m), exactly, rounded to nearest: the paper's DotExact.

◆ mround()

int mtl::generators::ill_conditioned_detail::mround ( double v)
inline

Matlab's round: half away from zero.

◆ permute()

template<typename A, typename B>
void mtl::generators::ill_conditioned_detail::permute ( A & a,
B & b,
std::mt19937_64 & gen )

Matlab's randperm applied to a pair of vectors: Fisher-Yates on the raw stream.

◆ rand01()

double mtl::generators::ill_conditioned_detail::rand01 ( std::mt19937_64 & gen)
inline

Uniform on [0, 1): the top 53 bits of one 64-bit draw.