Thanks Dan!
From the paper "Graph structure in the web" in WWW conference by
Broder et al, the definition of diameter is that:
The diameter of a graph, directed or undirected, is the maximum over
**all ordered paris**(u,v) of the shortest path from u to v.
So I think, I can first get all ordered pairs whose shoest path is not
infinity, and then find the maximum one.
Thanks again for your explanations.
> >> Yong- Hide quoted text -
>
> - Show quoted text -