Skip to content
Snippets Groups Projects
Commit a4459a93 authored by erwan's avatar erwan
Browse files

fix: the -seed in gg was ignored (the Random.init was done too late).

parent ffd3f7d7
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
This diff is collapsed.
# Automatically generated by /home/jahier/.opam/4.13.1/bin/sasa version "v4.5.7" ("38972d1") # Automatically generated by /home/jahier/.opam/4.13.1/bin/sasa version "v4.5.9" ("da5b46e")
# on crevetete the 16/2/2022 at 18:55:07 # on crevetete the 11/5/2022 at 11:30:16
#sasa grid4.dot -seed 42 #sasa grid4.dot -seed 42
#seed 42 #seed 42
......
This diff is collapsed.
...@@ -272,6 +272,10 @@ let () = ( ...@@ -272,6 +272,10 @@ let () = (
else else
Some g Some g
in in
(match t.seed with
| None -> Random.self_init ()
| Some i -> Random.init i
);
let g = let g =
match gen_graph () with match gen_graph () with
| None -> | None ->
...@@ -279,10 +283,6 @@ let () = ( ...@@ -279,10 +283,6 @@ let () = (
exit 2 exit 2
| Some g -> g | Some g -> g
in in
(match t.seed with
| None -> Random.self_init ()
| Some i -> Random.init i
);
make_dot g t.outputFile (all_attr t.rooted t.diameter g); make_dot g t.outputFile (all_attr t.rooted t.diameter g);
if (t.outputFile <> "" && not t.silent) if (t.outputFile <> "" && not t.silent)
then Printf.printf "Done.\nOutput file : '%s'\n" t.outputFile then Printf.printf "Done.\nOutput file : '%s'\n" t.outputFile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment