Given that that's a link to the documentation for the algorithm, I'd leave out the duplicate explanation in the code here.

@mythmon What would you like explained in specific here?