Open Wang-Yu-Qing opened 3 years ago
Let me answer my own question. This is a sample method called "Alias Method", which has a O(1) time complexity for sample and O(n) time complexity for construct the alias table (a data structure needed for this sample method). More details: https://www.keithschwarz.com/darts-dice-coins/
In GraphOps.scala:
What does this function do? I know that the J, q is used for transition probability, but what is J and q exactly and how they are related with transition probability?