MCPcopy Create free account
hub / github.com/apache/arrow / rand_uniform_int

Function rand_uniform_int

cpp/src/arrow/testing/random.h:766–771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764
765template <typename T, typename U>
766void rand_uniform_int(int64_t n, uint32_t seed, T min_value, T max_value, U* out) {
767 assert(out || (n == 0));
768 std::default_random_engine gen(seed);
769 std::uniform_int_distribution<T> d(min_value, max_value);
770 std::generate(out, out + n, [&d, &gen] { return static_cast<U>(d(gen)); });
771}
772
773} // namespace arrow

Callers 3

MakeListArrayFunction · 0.85
random_asciiFunction · 0.85

Calls

no outgoing calls

Tested by 2

MakeListArrayFunction · 0.68