void positive_jump_impl(RngBase& rng, double& value, const double scale) { double new_value; do { new_value = value + rng.normal() * scale; } while (new_value < 0); value = new_value; }
void jump_impl(RngBase& rng, double& value, const double scale) { value += rng.normal() * scale; }
void jump_impl(RngBase& rng, T& value, const double scale) { for(size_t i = 0; i < value.n_elem; i++) { value[i] += rng.normal() * scale; } }
// needed for completeness void jump_impl(RngBase& rng, int& value, const double scale) { value += lrint(rng.normal() * scale); }