| 104 | |
| 105 | template <typename T> |
| 106 | T RandomGaussian(const T mean, const T stddev) { |
| 107 | if (COLMAP_PREDICT_FALSE(PRNG == nullptr)) { |
| 108 | SetPRNGSeed(); |
| 109 | } |
| 110 | |
| 111 | std::normal_distribution<T> distribution(mean, stddev); |
| 112 | return distribution(*PRNG); |
| 113 | } |
| 114 | |
| 115 | template <typename T> |
| 116 | void Shuffle(const uint32_t num_to_shuffle, std::vector<T>* elems) { |