53 template<
typename dtype>
58 std::discrete_distribution<dtype> dist(inWeights.
cbegin(), inWeights.
cend());
74 template<
typename dtype>
81 std::discrete_distribution<dtype> dist(inWeights.
cbegin(), inWeights.
cend());
84 [&dist](dtype& value) ->
void
86 value = dist(generator_);
#define STATIC_ASSERT_INTEGER(dtype)
Definition: StaticAsserts.hpp:40
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1216
iterator end() noexcept
Definition: NdArrayCore.hpp:1474
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1524
iterator begin() noexcept
Definition: NdArrayCore.hpp:1166
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
dtype discrete(const NdArray< double > &inWeights)
Definition: discrete.hpp:54
static std::mt19937_64 generator_
generator function
Definition: generator.hpp:39
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition: StlAlgorithms.hpp:213
Definition: Coordinate.hpp:45