Internal helper function which gets the generator (and normalizing constant)
getGenerator(method, unnormDensFun, xVals, unnormDensVals)
the methods string
the unnormalized density function
the x values
the unnormalized density values
a list with the elements “generator” and “normConst”,
containing the generator function (with argument n
for the number
of samples) and the normalizing constant of the density, respectively.