X-Git-Url: https://scm.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/fc2ec49c325b99370170789886b4be4f43e16d68..b8e89a384896a4f8ce3e1990a10c88e7164af55c:/documentation/code_VALMain.write_output_txt.html diff --git a/documentation/code_VALMain.write_output_txt.html b/documentation/code_VALMain.write_output_txt.html deleted file mode 100644 index 472107f..0000000 --- a/documentation/code_VALMain.write_output_txt.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - -Main.write_output_txt - - -let write_output_txt = fun channel_int_list -> fun data_float_array_list ->
-        let () = print_endline("Making output txt files..."in
-
-        (* make output txt file names : output0, output1, ... *)
-        let n_output = List.length data_float_array_list in
-        let n_array = Array.init n_output (fun n -> n) in
-        let make_file_name i = "output" ^ (string_of_int i) ^ ".csv" in
-
-        (* make output wave file routes *)
-        let make_chemin s = io_macro_to_string Output_Route_string ^ s in
-        let file_name_string_array = Array.map make_file_name n_array in
-        let file_chemin_string_array = Array.map make_chemin file_name_string_array in
-        let file_chemin_string_list = Array.to_list file_chemin_string_array in
-
-        (* open output channels *)
-        let file_list = List.map open_out file_chemin_string_list in
-        let array_to_string = fun data_float_array -> fun channel_int ->
-          let data_length = Array.length data_float_array in
-          let rec to_string_rec = 
-            fun data -> fun channel -> fun n -> fun i -> fun column ->
-              if i < n then 
-                (
-                let element = string_of_float (data.(i)) in
-                if column < (channel - 1) then 
-                  element ^ "," ^ (to_string_rec data channel n (i + 1) (column + 1))
-                else if column = (channel - 1) then
-                  element ^ "\n" ^ (to_string_rec data channel n (i + 1) 0)
-                else raise (Invalid_argument "write_output_txt.")
-                    )
-              else "" in
-          to_string_rec data_float_array channel_int data_length 0 0 in
-
-        let data_string_list = List.map2 array_to_string data_float_array_list channel_int_list in
-        let _ = List.map2 output_string file_list data_string_list in
-        let _ = List.map close_out file_list in
-        print_endline("Success")
\ No newline at end of file