We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dcec3f commit 15a04a4Copy full SHA for 15a04a4
src/systems/alias_elimination.jl
@@ -11,6 +11,7 @@ function alias_eliminate_graph(sys)
11
end
12
13
@unpack graph, varassoc = s
14
+ invvarassoc = inverse_mapping(varassoc)
15
16
is_linear_equations, eadj, cadj = find_linear_equations(sys)
17
old_cadj = map(copy, cadj)
@@ -302,6 +303,15 @@ the `constraint`.
302
303
return 0, 0
304
305
306
+function inverse_mapping(assoc)
307
+ invassoc = zeros(Int, length(assoc))
308
+ for (i, v) in enumerate(assoc)
309
+ v <= 0 && continue
310
+ invassoc[v] = i
311
+ end
312
+ return invassoc
313
+end
314
+
315
"""
316
$(SIGNATURES)
317
0 commit comments