52 template<
typename dtype,
typename GeneratorType = std::mt19937>
53 dtype
randN(GeneratorType& generator)
57 std::normal_distribution<dtype> dist;
58 return dist(generator);
73 template<
typename dtype,
typename GeneratorType = std::mt19937>
80 std::normal_distribution<dtype> dist;
84 [&generator, &dist](dtype& value) ->
void { value = dist(generator); });
99 template<
typename dtype>
116 template<
typename dtype>
119 return detail::randN<dtype>(
generator_, inShape);
#define STATIC_ASSERT_FLOAT(dtype)
Definition: StaticAsserts.hpp:50
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:139
iterator end() noexcept
Definition: NdArrayCore.hpp:1623
iterator begin() noexcept
Definition: NdArrayCore.hpp:1315
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
dtype randN(GeneratorType &generator)
Definition: randN.hpp:53
Definition: Random/bernoulli.hpp:41
static std::mt19937_64 generator_
generator function
Definition: generator.hpp:35
dtype randN()
Definition: randN.hpp:100
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:225