Function EuclideanEmbedding.PickNRandomNodes

PickNRandomNodes (int count, List<GraphNode> buffer)

Pick N random walkable nodes from all nodes in all graphs and add them to the buffer.

Private
void PickNRandomNodes (

int

count

List<GraphNode>

buffer

)

Pick N random walkable nodes from all nodes in all graphs and add them to the buffer.

Here we select N random nodes from a stream of nodes. Probability of choosing the first N nodes is 1 Probability of choosing node i is min(N/i,1) A selected node will replace a random node of the previously selected ones.