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

Function random_real

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

Source from the content-addressed store, hash-verified

755
756template <typename T, typename U>
757void random_real(int64_t n, uint32_t seed, T min_value, T max_value,
758 std::vector<U>* out) {
759 std::default_random_engine gen(seed);
760 ::arrow::random::uniform_real_distribution<T> d(min_value, max_value);
761 out->resize(n, static_cast<T>(0));
762 std::generate(out->begin(), out->end(), [&d, &gen] { return static_cast<U>(d(gen)); });
763}
764
765template <typename T, typename U>
766void rand_uniform_int(int64_t n, uint32_t seed, T min_value, T max_value, U* out) {

Callers 7

CheckSliceApproxEqualsFunction · 0.85
TestRandomFunction · 0.85
TESTFunction · 0.85
BenchmarkTDigestFunction · 0.85
GenerateTestDataMethod · 0.85
NonNullArrayFunction · 0.85
NullableArrayFunction · 0.85

Calls 3

resizeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 6

CheckSliceApproxEqualsFunction · 0.68
TestRandomFunction · 0.68
TESTFunction · 0.68
GenerateTestDataMethod · 0.68
NonNullArrayFunction · 0.68
NullableArrayFunction · 0.68