The distance between two vertexSet is calculated as the number of edges in the shortest path between the two vertexSet. If the two vertexSet are not connected, the distance between them is infinity by convention.




The object distance is a method function.