From cd64a1f748abe51ed58ebbc9e82902dc625bcf45 Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Thu, 24 Jun 2021 00:15:48 +0000 Subject: [PATCH] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b1ba9e..38b2366 100644 --- a/README.md +++ b/README.md @@ -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 +auto generate_random() -> T +{ + std::random_device rd; + std::mt19937 mt(rd()); + std::uniform_real_distribution 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 to hash type T and a random uint64_t..