Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Added note to doctest warning that the method is faster for sparse gr…
Browse files Browse the repository at this point in the history
…aphs
  • Loading branch information
jt9485 committed Mar 15, 2020
1 parent 81a019f commit 781538f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sage/graphs/distances_all_pairs.pyx
Expand Up @@ -1321,7 +1321,9 @@ def diameter(G, algorithm='iFUB', source=None):
- ``'TYY'`` -- The ``TYY`` (Takuya A., Yoichi I., Yuki K.) algorithm
calculates the exact value of the diameter of an unweighted directed or
undirected graph. Note that we consider that the diameter of a digraph
which is not strongly connected is ``Infinity``.
which is not strongly connected is ``Infinity``. The worst case time
complexity of this algorithm is `O(nm)`, but for sparse graphs and can
be very fast.
- ``source`` -- (default: None) vertex from which to start the first BFS.
If ``source==None``, an arbitrary vertex of the graph is chosen. Raise an
Expand Down

0 comments on commit 781538f

Please sign in to comment.