Rejecting/thinning modes based on average density

Just to make sure that we are on the same page: by density I mean exp(logp()) at sample points.