metropolis function

Metropolis sampling of a continuous distribution