Sample a poisson conditional on it being even or odd This function is only computationally efficient when lambda is small.

sample_parity_poisson(lambda, parity = "even")

Arguments

lambda

Poisson parameter.

parity

Either "even" or "odd".

Value

Scalar, a sample from the poisson conditional on the specified parity