Update README.md

master
_xeroxz 4 years ago
parent 4163d33ab8
commit cd64a1f748

@ -5,7 +5,14 @@ This repo contains a list of utils that will probably need to be implimented for
* llo::utils::generate_random, generate a random numerical value.
```cpp
template <class T>
auto generate_random() -> T
{
std::random_device rd;
std::mt19937 mt(rd());
std::uniform_real_distribution<double> dist(1.0, 10.0);
return dist(mt);
}
```
* llo::utils::hash_t templated class that contains unique std::uint64_t hash value for any given data. use std::hash to compute the hash. https://en.cppreference.com/w/cpp/utility/hash. use std::hash<std::varient> to hash type T and a random uint64_t..

Loading…
Cancel
Save