The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fixed topological sort

+22 -1
+1
CHANGES.md
··· 1 1 2 + - [Topological]: Fix topological stable sort (#149, Maxime Buyse) 2 3 - [Path]: new module [Bfs01] to implement 0-1 BFS 3 4 - [Classic] new functions [kneser] and [petersen] to build Kneser's 4 5 graphs and the Petersen graph
+5
tests/dune
··· 43 43 (libraries graph) 44 44 (modules test_eulerian)) 45 45 46 + (test 47 + (name test_149) 48 + (libraries graph) 49 + (modules test_149)) 50 + 46 51 ;; Rules for the Bellman-Ford tests 47 52 48 53 (rule
+15
tests/test_149.ml
··· 1 + 2 + (* Issue #149 *) 3 + 4 + module G = Graph.Persistent.Digraph.Concrete(String) 5 + 6 + let g0 = G.empty 7 + let g1 = G.add_edge g0 "a" "b" 8 + let g2 = G.add_edge g1 "a" "c" 9 + let g = G.add_edge g2 "c" "a" 10 + 11 + module Topo = Graph.Topological.Make_stable(G) 12 + 13 + let l = Topo.fold (fun v l -> v :: l) g [] 14 + let () = assert (l = ["b"; "c"; "a"]) 15 +
+1 -1
tests/test_topsort.ml
··· 61 61 printf "test topsort: all tests succeeded.@." 62 62 63 63 let () = tests Topological.iter 64 - (* let () = tests Topological.iter_stable *) 64 + let () = tests Topological.iter_stable 65 65 66 66 let rec pow a = function 67 67 | 0 -> 1