an adapting rejection method that takes in a CDF of a distribution and outputs a random sample from that distribution