compute acceptance prob in c++, double check R
allow for user defined generation of S