Skip to content
Snippets Groups Projects
Commit 097f297f authored by Guyslain Naves's avatar Guyslain Naves
Browse files

ajout dans l'algo de copoint d'un test de compatibilité en fin d'algo

parent 3bcf601e
Branches
Tags
No related merge requests found
...@@ -160,6 +160,8 @@ let find_compatible_order (type elt) diss = ...@@ -160,6 +160,8 @@ let find_compatible_order (type elt) diss =
let module D = struct type t = elt let d = diss.d end in let module D = struct type t = elt let d = diss.d end in
let module M = Make(D) in let module M = Make(D) in
try try
Some (M.find_compatible_order (Array.of_list diss.elements)) let order = M.find_compatible_order (Array.of_list diss.elements) in
if Dissimilarity.is_compatible_order diss (Array.to_list order) then Some order
else None
with with
| M.Not_Robinson -> None | M.Not_Robinson -> None
...@@ -175,6 +175,8 @@ let find_compatible_order (type elt) diss = ...@@ -175,6 +175,8 @@ let find_compatible_order (type elt) diss =
in in
let module M = Make(D) in let module M = Make(D) in
try try
Some (M.find_compatible_order diss.elements) let order = M.find_compatible_order diss.elements in
if Dissimilarity.is_compatible_order diss order then Some order
else None
with with
| M.Not_Robinson -> None | M.Not_Robinson -> None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment