Fix bugs and add R API for indexed binomial proposal metropolis sampler