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

Function RandomEdge

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

Returns the index of a randomly chosen edge in *edges. Requires *edges be non-empty.

Source from the content-addressed store, hash-verified

181// Returns the index of a randomly chosen edge in *edges.
182// Requires *edges be non-empty.
183static int RandomEdge(std::mt19937 *rnd, Edges *edges) {
184 std::uniform_int_distribution<int> distribution(0, edges->size() - 1);
185 return distribution(*rnd);
186}
187
188// Returns the index of edge (from, to) in *edges or -1 if it is not in *edges.
189static int EdgeIndex(Edges *edges, int from, int to) {

Callers 1

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected