Skip to content

Commit ca9b78f

Browse files
committed
simplify varvar_deps
1 parent 16ae064 commit ca9b78f

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/systems/dependency_graphs.jl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,4 @@ function eqeq_dendencies(eqdeps::BipartiteGraph{T}, vardeps::BipartiteGraph{T})
104104
end
105105

106106
# maps the i'th variable to variables that depend on it
107-
function varvar_dependencies(eqdeps::BipartiteGraph{T}, vardeps::BipartiteGraph{T}) where {T <: Integer}
108-
g = SimpleDiGraph{T}(length(vardeps.fadjlist))
109-
110-
for (sidx,eqidxs) in enumerate(eqdeps.badjlist)
111-
# eqs modified by eqidx
112-
for eqidx in eqidxs
113-
# states depending on eqidx
114-
foreach(v -> add_edge!(g, sidx, v), vardeps.badjlist[eqidx])
115-
end
116-
end
117-
118-
g
119-
end
107+
varvar_dependencies(eqdeps::BipartiteGraph{T}, vardeps::BipartiteGraph{T}) where {T <: Integer} = eqeq_dendencies(vardeps, eqdeps)

0 commit comments

Comments
 (0)