Compute all-pairs boolean class distance.