Implemented several distances for spectrum/haplotypes