From 20caf634bd3c9783a7822e86811a7e77a88d378f Mon Sep 17 00:00:00 2001 From: pierwill Date: Tue, 30 Jun 2020 15:16:18 -0700 Subject: [PATCH] Edit docs for rustc_data_structures::graph::scc - Add newline to provide concise module summary - Add wikipedia link - Italicize O notation --- src/librustc_data_structures/graph/scc/mod.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/librustc_data_structures/graph/scc/mod.rs b/src/librustc_data_structures/graph/scc/mod.rs index 57eaf56f268f8..2db8e466e1144 100644 --- a/src/librustc_data_structures/graph/scc/mod.rs +++ b/src/librustc_data_structures/graph/scc/mod.rs @@ -1,7 +1,9 @@ -//! Routine to compute the strongly connected components (SCCs) of a -//! graph, as well as the resulting DAG if each SCC is replaced with a -//! node in the graph. This uses Tarjan's algorithm that completes in -//! O(n) time. +//! Routine to compute the strongly connected components (SCCs) of a graph. +//! +//! Also computes as the resulting DAG if each SCC is replaced with a +//! node in the graph. This uses [Tarjan's algorithm]( +//! https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm) +//! that completes in *O(n)* time. use crate::fx::FxHashSet; use crate::graph::vec_graph::VecGraph;