MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / RandomNode

Function RandomNode

tensorflow/compiler/jit/graphcycles/graphcycles_test.cc:176–179  ·  view source on GitHub ↗

Returns the index of a randomly chosen node in *nodes. Requires *nodes be non-empty.

Source from the content-addressed store, hash-verified

174// Returns the index of a randomly chosen node in *nodes.
175// Requires *nodes be non-empty.
176static int RandomNode(std::mt19937 *rnd, Nodes *nodes) {
177 std::uniform_int_distribution<int> distribution(0, nodes->size() - 1);
178 return distribution(*rnd);
179}
180
181// Returns the index of a randomly chosen edge in *edges.
182// Requires *edges be non-empty.

Callers 1

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected