MCPcopy Create free account
hub / github.com/colmap/colmap / RandomUniformInteger

Function RandomUniformInteger

src/colmap/math/random.h:86–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84
85template <typename T>
86T RandomUniformInteger(const T min, const T max) {
87 if (COLMAP_PREDICT_FALSE(PRNG == nullptr)) {
88 SetPRNGSeed();
89 }
90
91 std::uniform_int_distribution<T> distribution(min, max);
92 return distribution(*PRNG);
93}
94
95template <typename T>
96T RandomUniformReal(const T min, const T max) {

Callers 4

TESTFunction · 0.85
CreateRandomRgbImageFunction · 0.85

Calls 1

SetPRNGSeedFunction · 0.85

Tested by 4

TESTFunction · 0.68
CreateRandomRgbImageFunction · 0.68