MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
randspd.hpp File Reference
#include <cstddef>
#include <cstdint>
#include <random>
#include <stdexcept>
#include <vector>
#include <mtl/mat/dense2D.hpp>
#include <mtl/operation/random.hpp>
#include <mtl/generators/randsvd.hpp>

Namespaces

namespace  mtl
namespace  mtl::generators

Functions

template<typename T = double>
auto mtl::generators::randspd (std::size_t n, const std::vector< T > &eigenvalues, std::mt19937_64 &gen)
 A symmetric positive definite matrix with prescribed eigenvalues, Q drawn from gen.
template<typename T = double>
auto mtl::generators::randspd (std::size_t n, const std::vector< T > &eigenvalues, std::uint64_t seed)
 Prescribed eigenvalues, reproducibly from seed.
template<typename T = double>
auto mtl::generators::randspd (std::size_t n, const std::vector< T > &eigenvalues)
 Prescribed eigenvalues, non-deterministically.
template<typename T = double>
auto mtl::generators::randspd (std::size_t n, T kappa, int mode, std::mt19937_64 &gen)
 An SPD matrix with eigenvalues in [1/kappa, 1] from mode (the randsvd modes 1-5, see make_sigma), drawing from gen.
template<typename T = double>
auto mtl::generators::randspd (std::size_t n, T kappa, int mode, std::uint64_t seed)
 Eigenvalues from kappa and mode, reproducibly from seed.
template<typename T = double>
auto mtl::generators::randspd (std::size_t n, T kappa, int mode=3)
 Eigenvalues from kappa and mode, non-deterministically.