MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / getRandomInts

Function getRandomInts

tests/utils/random.cpp:125–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124
125vector<int> getRandomInts(int min, int maxExcl, int len) {
126 DEMAND( len >= 0 ); // permit empty
127 DEMAND( min < maxExcl );
128
129 vector<int> out(len);
130
131 for (auto& x : out)
132 x = getRandomInt(min, maxExcl);
133
134 return out;
135}
136
137
138vector<int> getRandomOutcomes(int len) {

Callers 2

getRandomOutcomesFunction · 0.85

Calls 1

getRandomIntFunction · 0.70

Tested by

no test coverage detected