@@ -12,19 +12,22 @@ main = do
12
12
evaluate $ rnf randGs
13
13
defaultMain
14
14
[ bgroup " buildG" $ forGs randGs $ \ g -> nf (G. buildG (bounds (getG g))) (getEdges g)
15
- , bgroup " graphFromEdges" $ forGs randGs $ nf ((\ (g, _, _) -> g) . G. graphFromEdges) . getAdjList
15
+ , bgroup " graphFromEdges" $
16
+ forGs [randG1, randG2, randG3] $ nf ((\ (g, _, _) -> g) . G. graphFromEdges) . getAdjList
16
17
, bgroup " dfs" $ forGs randGs $ nf (flip G. dfs [1 ]) . getG
17
18
, bgroup " dff" $ forGs randGs $ nf G. dff . getG
18
19
, bgroup " topSort" $ forGs randGs $ nf G. topSort . getG
19
20
, bgroup " scc" $ forGs randGs $ nf G. scc . getG
20
21
, bgroup " bcc" $ forGs [randG1, randG2] $ nf G. bcc . getG
21
- , bgroup " stronglyConnCompR" $ forGs randGs $ nf G. stronglyConnCompR . getAdjList
22
+ , bgroup " stronglyConnCompR" $
23
+ forGs [randG1, randG2, randG3] $ nf G. stronglyConnCompR . getAdjList
22
24
]
23
25
where
24
26
randG1 = buildRandG 100 1000
25
27
randG2 = buildRandG 100 10000
26
28
randG3 = buildRandG 10000 100000
27
- randGs = [randG1, randG2, randG3]
29
+ randG4 = buildRandG 100000 1000000
30
+ randGs = [randG1, randG2, randG3, randG4]
28
31
29
32
-- Note: In practice it does not make sense to run topSort or bcc on a random
30
33
-- graph. For topSort the graph should be acyclic and for bcc the graph should
0 commit comments