(c) 2012 Brendon J. Brewer. LICENCE: GNU GPL 3 (see LICENCE file)
For a description of the algorithm, see the following papers:
http://arxiv.org/abs/1202.3665 (Foreman-Mackey et al 2012)
Goodman, J. & Weare, J., 2010, Comm. App. Math. Comp. Sci., 5, 65
I'm also using this to practice R.