Source: http://www.i3s.unice.fr/~nlt/cours/licence/pdist/pdist1_slides.pdf