 |
NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Go to the documentation of this file.
54 template<
typename dtype>
59 std::discrete_distribution<dtype> dist(inWeights.
cbegin(), inWeights.
cend());
76 template<
typename dtype>
83 std::discrete_distribution<dtype> dist(inWeights.
cbegin(), inWeights.
cend());
86 [&dist](dtype& value) ->
void
88 value = dist(generator_);
#define STATIC_ASSERT_INTEGER(dtype)
Definition: StaticAsserts.hpp:40
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:213
dtype discrete(const NdArray< double > &inWeights)
Definition: discrete.hpp:55
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:40
iterator end() noexcept
Definition: NdArrayCore.hpp:1431
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1487
Definition: Coordinate.hpp:44
static std::mt19937_64 generator_
generator function
Definition: generator.hpp:39
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1143
iterator begin() noexcept
Definition: NdArrayCore.hpp:1087