Finish an implementation of gamma distribution.