51 const idx_t n = size(
x);
52 const double twopi(8 * std::atan(1.0));
59 if constexpr (
idist == 1) {
60 std::uniform_real_distribution<>
d1(0, 1);
61 for (idx_t i = 0; i < n; ++i) {
68 else if constexpr (
idist == 2) {
69 std::uniform_real_distribution<>
d2(-1, 1);
70 for (idx_t i = 0; i < n; ++i) {
77 else if constexpr (
idist == 3) {
78 std::normal_distribution<>
d3(0, 1);
79 for (idx_t i = 0; i < n; ++i) {
87 if constexpr (
idist == 4) {
88 std::uniform_real_distribution<>
d4(0, 1);
89 for (idx_t i = 0; i < n; ++i) {
95 else if constexpr (
idist == 5) {
96 std::uniform_real_distribution<>
d5(0, 1);
97 for (idx_t i = 0; i < n; ++i) {
void larnv(iseed_t &iseed, vector_t &x)
Returns a vector of n random numbers from a uniform or normal distribution.
Definition larnv.hpp:44
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113