Merge branch 'main' of www.swiftcoder.nl:git/experimental/cpp/libscnumerics
This commit is contained in:
commit
94043b3aac
@ -27,7 +27,7 @@ namespace sc {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static T choice(const std::vector<T>& vec) {
|
static T choice(const std::vector<T>& vec) {
|
||||||
std::uniform_int_distribution<int> dist {0, vec.size() - 1};
|
std::uniform_int_distribution<int> dist {0, static_cast<int>(vec.size()) - 1};
|
||||||
return vec[dist(instance()._reng)];
|
return vec[dist(instance()._reng)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user