Commit dca08592 authored by Frontull Samuel's avatar Frontull Samuel
Browse files

fixed approximative computation of legal paths

parent 7e671c1a
......@@ -492,12 +492,13 @@ let composition newpaths acc nodes bedges =
(* L.filter is_legal (linear_list (L.flatten comp)) *)
linear_list (L.flatten comp)
let rec similar_redex wbp = function
let rec similar_redex wbp approx = function
| x :: xs ->
first_wbp wbp = first_wbp x
&& last_wbp wbp = last_wbp x
&& islam_node (last_wbp x)
|| similar_redex wbp xs
&& approx
|| similar_redex wbp approx xs
| [] -> false
let rec _well_balanced_paths newpaths acc nodes bedges n approx =
......@@ -509,7 +510,7 @@ let rec _well_balanced_paths newpaths acc nodes bedges n approx =
(fun x ->
(not (L.mem x acc))
&& (not (first_wbp x = last_wbp x))
&& (approx && not (similar_redex x acc)))
&& not (similar_redex x approx acc))
paths
in
let newacc = acc @ newpaths in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment