Utility functions for sequential Monte Carlo