calculateWeightedDistMatrix function

Calculates a weighted representation of the distance matrix.