Stochastic wave-function approach to non-Markovian systems.