MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / randrange

Function randrange

contents/IFS/code/cpp/IFS.cpp:30–32  ·  view source on GitHub ↗

Returns a random integer in [0, numElems-1]

Source from the content-addressed store, hash-verified

28
29// Returns a random integer in [0, numElems-1]
30std::size_t randrange(std::size_t numElems) {
31 return std::uniform_int_distribution<std::size_t>(0, numElems - 1)(rng());
32}
33
34// Return a random point from the non-empty PointVector
35Point choose(const PointVector& points) {

Callers 1

chooseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected