X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FgTopLevel%2Fesempi%2Ffourier%2Ffourier_make_benchmarks.ml;fp=helm%2FgTopLevel%2Fesempi%2Ffourier%2Ffourier_make_benchmarks.ml;h=0000000000000000000000000000000000000000;hb=3ef089a4c58fbe429dd539af6215991ecbe11ee2;hp=d783089a25e9f27c2a0b22cf6c635e4f8cfa0844;hpb=1c7fb836e2af4f2f3d18afd0396701f2094265ff;p=helm.git diff --git a/helm/gTopLevel/esempi/fourier/fourier_make_benchmarks.ml b/helm/gTopLevel/esempi/fourier/fourier_make_benchmarks.ml deleted file mode 100644 index d783089a2..000000000 --- a/helm/gTopLevel/esempi/fourier/fourier_make_benchmarks.ml +++ /dev/null @@ -1,61 +0,0 @@ -let rec int_to_cic n = - if n < 0 then - "(Ropp "^int_to_cic (-n)^")" - else - match n with - 0 -> " R0" - |1 -> " R1" - |k -> "(Rplus R1 " ^ int_to_cic (n-1) ^")" -;; - -let dimx = ref 3;; -let dimy = ref 3;; -let kmax = ref 5;; -let vl = [|"x";"y";"z";"t";"u";"v";"w";"g";"h";"j";"l";"m";"n";"o";"p";"q";"r";"s";"a";"b";"c";"d"|] -;; - -let nth_inc n = - vl.(n) -;; - -let preamble () = - for i = 0 to !dimx do - print_string ("!"^nth_inc i^":R."); - done; - print_string "\n"; -;; - -let main () = - print_string "Immetti m : ";dimy := (read_int ()) - 1; - print_string "Immetti n : ";dimx := (read_int ()) - 1; - print_string "Immetti K : ";kmax := (read_int ()) + 1; - print_string ("Genero un sistema di "^ - string_of_int (!dimy+1)^" disequazioni in "^ - string_of_int (!dimx+1)^" incognite con coefficenti "^string_of_int !kmax^"\n\n"); - Random.self_init (); - preamble (); - let max = ref 0 in - for i=0 to !dimy do - begin - print_string "(Rle "; - for o=0 to !dimx do - let k = ref ((Random.int !kmax)) in - if !k > !max then max := !k; - if i=o then - k := - !k - else - k := !k; - print_string ("(Rplus (Rmult "^int_to_cic !k^" "^nth_inc o^") "); - done; - print_string "(Ropp R1)"; - for o=0 to !dimx do - print_string (")"); - done; - print_string (" R0)\n->\n"); - end - done; - print_string ("\n\nIl massimo K e' "^string_of_int !max^".\nLa tesi la puoi scegliere tu, ma se ricopi una ipotesi vai tranquillo.\n"); -;; - - -main ();;