Generating discrete-time constrained random walks and Lévy flights.