Permutation methods: a distance function approach | Synapse