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

Function randint

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

Source from the content-addressed store, hash-verified

738
739template <typename T, typename U>
740void randint(int64_t N, T lower, T upper, std::vector<U>* out) {
741 const int random_seed = 0;
742 std::default_random_engine gen(random_seed);
743 std::uniform_int_distribution<T> d(lower, upper);
744 out->resize(N, static_cast<T>(0));
745 std::generate(out->begin(), out->end(), [&d, &gen] { return static_cast<U>(d(gen)); });
746}
747
748template <typename T, typename U>
749void 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