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
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1270
iterator end() noexcept
Definition: NdArrayCore.hpp:1558
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1614
iterator begin() noexcept
Definition: NdArrayCore.hpp:1214
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
dtype discrete(const NdArray< double > &inWeights)
Definition: discrete.hpp:55
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