Small fix
This commit is contained in:
parent
6c08637b13
commit
673a95d0cb
11
trees.ml
11
trees.ml
|
@ -112,17 +112,18 @@ let even_more_pretty_printing t r ystep skip =
|
|||
connect graphdata.(dpth-1);
|
||||
done;
|
||||
|
||||
set_line_width 5 ;
|
||||
set_line_width (max 1 (r/6)) ;
|
||||
for dpth = 0 to (Array.length graphdata -1) do
|
||||
draw_list graphdata.(dpth) dpth r
|
||||
done;
|
||||
|
||||
(*
|
||||
let halt = ref false in
|
||||
while !halt = false do
|
||||
Unix.sleepf 0.1 ;
|
||||
Unix.sleepf 2.0 ;
|
||||
halt := true;
|
||||
done;
|
||||
done;*)
|
||||
end;
|
||||
graphdata ;;
|
||||
|
||||
|
@ -360,16 +361,16 @@ let successive_insert () =
|
|||
Stdlib.print_endline "What element would you like to insert ? (crash to terminate)";
|
||||
let elt = Scanf.bscanf Scanf.Scanning.stdin "%d\n" identity in
|
||||
|
||||
close_graph () ;
|
||||
open_graph " 1200x1000" ;
|
||||
set_window_title "Trees" ;
|
||||
|
||||
cur_tree := insert_abr !cur_tree elt;
|
||||
ignore (pretty_tree_printing_new_version !cur_tree 40 100 1200 1000 true)
|
||||
(*ignore (pretty_tree_printing_new_version !cur_tree 40 100 1200 1000 true)*)
|
||||
ignore (even_more_pretty_printing !cur_tree 20 100 false);
|
||||
done;
|
||||
()
|
||||
with
|
||||
| Stdlib.Scanf.Scan_failure _ -> ignore (pretty_tree_printing_new_version !cur_tree 40 150 1200 1000 true) ;close_graph () ;;
|
||||
| Stdlib.Scanf.Scan_failure _ -> ignore (even_more_pretty_printing !cur_tree 20 100 false) ;close_graph () ;;
|
||||
|
||||
(* --------------------------------------| TESTS |-------------------------------------- *)
|
||||
Random.self_init () ;;
|
||||
|
|
Loading…
Reference in New Issue