I have a count time series `D_t`, for `t = 1, ..., T`, and I want to fit a Poisson changepoint model with `K_cp` changepoints, so that the series is partitioned into `K_cp + 1` segments, each with its own Poisson rate.

My model is:
For segment `j = 1, ..., K_cp + 1`,

`lambda_j ~ Exponential(r_j).`

Conditional on an ordered changepoint configuration, the observations within segment `j` satisfy

`D_t ~ Poisson(lambda_j).`

The changepoint locations have a uniform prior over all ordered `K_cp`-tuples of internal boundaries, and the Stan program marginalizes over those changepoint configurations by dynamic programming.

Here:
`D_t` is the observed count at time t,
`lambda_j` is the Poisson rate in segment j,
`r_j` is the exponential-prior rate for `lambda_j`,
`K_cp` is the number of changepoints,
`T` is the length of the time series.

Parameterization notes:
In `Exponential(lambda)`, `lambda` is the rate parameter, so `E[X] = 1 / lambda`.
