From 7f6d93a31f1cccd13ee5f9c3ae6aff2bed113d1d Mon Sep 17 00:00:00 2001 From: Thomas MESLIN <th.meslin@gmail.com> Date: Tue, 8 Apr 2025 04:25:26 +0200 Subject: [PATCH] Added export of all graphs, asso with fantom and not fantome + eleve vs fantome --- makefile | 6 +++--- script/src/graph_export.ml | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 0e5edd2..785debe 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ caml_file := coef_to_csv csv caml_need_csv := point_assos_to_gephi graph_export caml_to_run := coef_to_csv. point_assos_to_gephi. graph_export. -gefx_to_test := mynetwork +gefx_to_test := graphe_assos_actif_frantome graphe_assos_actif graphe_eleve_vs_fantome all: compile run clean test compile: init $(caml_file) $(caml_need_csv) complete_compile @@ -41,11 +41,11 @@ init_test: @echo "Testing gefx file format" $(gefx_to_test): - @echo "testing $@.gefx" + @echo "testing $@.gexf" @cd test_format;xmllint --noout --schema gexf.xsd ../res_script/$@.gexf end_test: - @echo "All gefx have been tested\nTest Completed\n" + @echo "All gexf have been tested\nTest Completed\n" diff --git a/script/src/graph_export.ml b/script/src/graph_export.ml index fc5dcc9..9183b78 100644 --- a/script/src/graph_export.ml +++ b/script/src/graph_export.ml @@ -88,10 +88,20 @@ let () = begin (*Id,Label,Categorie*) let edge_data = Csv.open_as_csv "../../res_script/edges_avec_fantome.csv" in (*Source,Target,Type,Id,Weight*) - create_gexf "../../res_script/mynetwork.gexf" node_data edge_data; + create_gexf "../../res_script/graphe_assos_actif_frantome.gexf" node_data edge_data; + + let node_data = Csv.open_as_csv "../../res_script/nodes_sans_fantome.csv" in + (*Id,Label,Categorie*) + let edge_data = Csv.open_as_csv "../../res_script/edges_sans_fantome.csv" in + (*Source,Target,Type,Id,Weight*) + create_gexf "../../res_script/graphe_assos_actif.gexf" node_data edge_data; + + let node_data = Csv.open_as_csv "../../res_script/nodes_eleve_vs_fantome.csv" in + (*Id,Label,Categorie*) + let edge_data = Csv.open_as_csv "../../res_script/edges_eleve_vs_fantome.csv" in + (*Source,Target,Type,Id,Weight*) + create_gexf "../../res_script/graphe_eleve_vs_fantome.gexf" node_data edge_data; - - print_endline "Graphes exporté au bon format avec succès" end -- GitLab