Diameter of a graph.