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

Function randint

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

Source from the content-addressed store, hash-verified

746
747template <typename T, typename U>
748void randint(int64_t N, T lower, T upper, std::vector<U>* out) {
749 const int random_seed = 0;
750 std::default_random_engine gen(random_seed);
751 std::uniform_int_distribution<T> d(lower, upper);
752 out->resize(N, static_cast<T>(0));
753 std::generate(out->begin(), out->end(), [&d, &gen] { return static_cast<U>(d(gen)); });
754}
755
756template <typename T, typename U>
757void random_real(int64_t n, uint32_t seed, T min_value, T max_value,

Callers 7

TEST_FFunction · 0.85
generate_junkFunction · 0.85
SetUpMethod · 0.85
MakeSimpleListArrayFunction · 0.85
operator()Method · 0.85
NonNullArrayFunction · 0.85
NullableArrayFunction · 0.85

Calls 3

resizeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 6

TEST_FFunction · 0.68
SetUpMethod · 0.68
MakeSimpleListArrayFunction · 0.68
operator()Method · 0.68
NonNullArrayFunction · 0.68
NullableArrayFunction · 0.68