The algorithms are coded in a way that makes it trivial to apply them to other problems. Several generic routines for resampling are provided. The derivation and details are presented in: Rudolph van der Merwe, Arnaud Doucet, Nando de Freitas and Eric Wan