A Fast Iterative Algorithm for Generating Set Partitions