The ASD between two diploid genotypes is (Gao and Martin, 2009):
$$\frac{1}{L}\sum_{j=1}^L d_j$$
where \(L\) is the number loci, \(d_j\) is the value for the
\(j\)th locus: 0 if both genotypes are identical, 1 if they have one
allele in common, or 2 if they have no allele in common.
dist.snp
works only with biallelic, unphased, diploid
genotypes. (These do not actually need to be SNPs: for instance, they
could be A/A, A/a, and a/a). Note that the required conditions
are not checked by the present function: see the functions below.
dist.asd
works for all diploid genotypes (phased or unphased,
with two alleles or more).