  A numerical method of calculating the non-Markovian evolution of a driven
atom radiating into a structured continuum is developed. The formal solution
for the atomic reduced density matrix is written as a Markovian algorithm by
introducing a set of additional, virtual density matrices which follow, to the
level of approximation of the algorithm, all the possible trajectories of the
photons in the electromagnetic field. The technique is perturbative in the
sense that more virtual density matrices are required as the product of the
effective memory time and the effective coupling strength become larger. The
number of density matrices required is given by $3^{M}$ where $M$ is the number
of timesteps per memory time. The technique is applied to the problem of a
driven two-level atom radiating close to a photonic band gap and the
steady-state correlation function of the atom is calculated.
