Use static internal class and method for Cheng's sampling.

The static components allow an implementation closer to the original
patch contribution, avoiding weird variables renamings.
1 file changed