@@ -9,9 +9,8 @@ $(SIGNATURES)
99Part of the API, Exported
1010"""
1111function syms_in_paths (paths, f, l)
12- thepaths = deepcopy (paths)
1312 syms = Symbol[]
14- for p in thepaths
13+ for p in paths
1514 setdiff! (p, [f, l])
1615 append! (syms, p)
1716 unique! (syms)
@@ -44,22 +43,22 @@ $(SIGNATURES)
4443
4544Part of the API, Exported
4645"""
47- function adjustment_sets (d :: DAG , f:: Symbol , l:: Symbol ; debug= false )
46+ function adjustment_sets (dag :: DAG , f:: Symbol , l:: Symbol ; debug= false )
4847
49- ap = all_paths (d , f, l)
50- paths = backdoor_paths (d , ap, f)
48+ ap = all_paths (dag , f, l)
49+ paths = backdoor_paths (dag , ap, f)
5150 debug && display (paths)
5251 lsyms = syms_in_paths (paths, f, l)
5352 adjustmentsets = Vector{Symbol}[]
5453 for s in lsyms
5554 debug && println (" checking $s in $lsyms " )
5655 if sym_in_all_paths (paths, s)
57- opensets = length (open_paths (d , paths, [s]))
56+ opensets = length (open_paths (dag , paths, [s]))
5857 if opensets == 0
5958 debug && println (" $s closes all paths." )
6059 append! (adjustmentsets, [[s]])
6160 end
62- elseif length (open_paths (d , paths, [s])) == 0
61+ elseif length (open_paths (dag , paths, [s])) == 0
6362 debug && println (" $s not in all paths but no open paths." )
6463 append! (adjustmentsets, [[s]])
6564 end
@@ -74,7 +73,7 @@ function adjustment_sets(d::DAG, f::Symbol, l::Symbol; debug=false)
7473 csyms = collect (combinations (lsyms, len))
7574 debug && csyms |> display
7675 for s in csyms
77- if length (open_paths (d , paths, s)) == 0
76+ if length (open_paths (dag , paths, s)) == 0
7877 debug && println (" $s closes all paths" )
7978 append! (adjustmentsets, [s])
8079 setdiff! (lsyms, s)
0 commit comments