communitydist function

Distances between communities