Stratified permutations according to partition info; Offline sequential distance calc debugged