Calculations for closenesses