Acceptance Rejection RV
Implements the acceptance/rejection algorithm for uni-variate distributions. The user must supply a continuous distribution that acts as the proposal distribution and the PDF of the distribution from which random variates will be generated. The two distributions must be domain compatible. The proposal distribution's domain must wholly contain the domain of the PDF from which random variates will be generated. If the target PDF's domain is not within the proposal distribution's domain then all proposed values would be rejected.
Since the proposal distribution may generate values outside the domain of the target PDF it is essential that the PDF function return 0.0 for any value of x that is not within its domain.
Parameters
the proposal distribution for generating variates that could be rejected
the majorizing constant for the rejection process
the PDF from which random variates are needed
the random number stream number, defaults to 0, which means the next stream
the provider of random number streams, defaults to KSLRandom.DefaultRNStreamProvider
an optional name