biais
This commit is contained in:
parent
33181d550a
commit
e584f30f74
4 changed files with 23 additions and 11 deletions
12
Makefile
12
Makefile
|
@ -17,11 +17,17 @@ advanced:
|
||||||
@echo "\n==== COMPILING ====\n"
|
@echo "\n==== COMPILING ====\n"
|
||||||
ocamlbuild ftest_advanced.native
|
ocamlbuild ftest_advanced.native
|
||||||
|
|
||||||
demo: build
|
demo_advanced: build
|
||||||
@echo "\n==== EXECUTING ====\n"
|
@echo "\n==== EXECUTING ====\n"
|
||||||
./ftest.native graphs/graph1 1 2 outfile
|
./ftest_advanced.native graphs/graph2 graphs/graph4
|
||||||
@echo "\n==== RESULT ==== (content of outfile) \n"
|
@echo "\n==== RESULT ==== (content of outfile) \n"
|
||||||
@cat outfile
|
@cat graphs/graph4
|
||||||
|
|
||||||
|
demo_basic: build
|
||||||
|
@echo "\n==== EXECUTING ====\n"
|
||||||
|
./ftest_basic.native graphs/graph1 graphs/graph3 1 5
|
||||||
|
@echo "\n==== RESULT ==== (content of outfile) \n"
|
||||||
|
@cat graphs/graph3
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -rf _build/
|
-rm -rf _build/
|
||||||
|
|
|
@ -40,6 +40,12 @@ let blf gr id_src id_dest=
|
||||||
blf_tab.(id).father<-a;
|
blf_tab.(id).father<-a;
|
||||||
if not (List.mem id file_marque) then loop_suc d blf_tab (id::file) else loop_suc d blf_tab file
|
if not (List.mem id file_marque) then loop_suc d blf_tab (id::file) else loop_suc d blf_tab file
|
||||||
end
|
end
|
||||||
|
(*else if lcapa <> 0 && (Int.add blf_tab.(a).cout lcout)=(blf_tab.(id).cout) && ((Random.int 2)=0) then
|
||||||
|
begin
|
||||||
|
blf_tab.(id).cout<-(Int.add blf_tab.(a).cout lcout);
|
||||||
|
blf_tab.(id).father<-a;
|
||||||
|
if not (List.mem id file_marque) then loop_suc d blf_tab (id::file) else loop_suc d blf_tab file
|
||||||
|
end*)
|
||||||
else loop_suc d blf_tab file in
|
else loop_suc d blf_tab file in
|
||||||
loop_suc l_out_arc blf_tab b in
|
loop_suc l_out_arc blf_tab b in
|
||||||
blf_rec gr file_id file_marque
|
blf_rec gr file_id file_marque
|
||||||
|
|
|
@ -10,8 +10,8 @@ open Bp
|
||||||
let () =
|
let () =
|
||||||
|
|
||||||
(*/!\ Format de la commande pour lancer le test :
|
(*/!\ Format de la commande pour lancer le test :
|
||||||
./ftest.native [nom_fichier_lecture] [id_source] [id_dest] [nom_fichier_ecriture]
|
./ftest_advanced.native [nom_fichier_lecture] [nom_fichier_ecriture]
|
||||||
ex : ./ftest.native graphs/graph1 0 5 graphs/graph3 *)
|
ex : ./ftest_advanced.native graphs/graph2 graphs/graph4 *)
|
||||||
|
|
||||||
(* Check the number of command-line arguments *)
|
(* Check the number of command-line arguments *)
|
||||||
if Array.length Sys.argv <> 3 then
|
if Array.length Sys.argv <> 3 then
|
||||||
|
|
|
@ -10,8 +10,8 @@ open Bp
|
||||||
let () =
|
let () =
|
||||||
|
|
||||||
(*/!\ Format de la commande pour lancer le test :
|
(*/!\ Format de la commande pour lancer le test :
|
||||||
./ftest.native [nom_fichier_lecture] [id_source] [id_dest] [nom_fichier_ecriture]
|
./ftest_basic.native [nom_fichier_lecture] [nom_fichier_ecriture] [id_source] [id_dest]
|
||||||
ex : ./ftest.native graphs/graph1 0 5 graphs/graph3 *)
|
ex : ./ftest_basic.native graphs/graph1 graphs/graph3 0 5 *)
|
||||||
|
|
||||||
(* Check the number of command-line arguments *)
|
(* Check the number of command-line arguments *)
|
||||||
if Array.length Sys.argv <> 5 then
|
if Array.length Sys.argv <> 5 then
|
||||||
|
@ -21,7 +21,7 @@ let () =
|
||||||
end ;
|
end ;
|
||||||
|
|
||||||
|
|
||||||
(* Arguments are : infile(1) source-id(2) sink-id(3) outfile(4) *)
|
(* Arguments are : infile(1) outfile(2) source-id(3) sink-id(4) *)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,6 +56,6 @@ let () =
|
||||||
|
|
||||||
|
|
||||||
(*Uncomment the following line if you have graphviz installed *)
|
(*Uncomment the following line if you have graphviz installed *)
|
||||||
(*let retour = command ("dot -Tsvg "^outfile^".dot > "^outfile^".svg") in *)
|
let retour = command ("dot -Tsvg "^outfile^".dot > "^outfile^".svg") in
|
||||||
()
|
()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue