Skip to content

Commit 64d83fd

Browse files
committed
rebase
1 parent c57ad8c commit 64d83fd

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

src/network_analysis.jl

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -359,51 +359,6 @@ end
359359

360360
linkageclasses(incidencegraph) = Graphs.connected_components(incidencegraph)
361361

362-
"""
363-
stronglinkageclasses(rn::ReactionSystem)
364-
365-
Return the strongly connected components of a reaction network's incidence graph (i.e. sub-groups of reaction complexes such that every complex is reachable from every other one in the sub-group).
366-
"""
367-
368-
function stronglinkageclasses(rn::ReactionSystem)
369-
nps = get_networkproperties(rn)
370-
if isempty(nps.stronglinkageclasses)
371-
nps.stronglinkageclasses = stronglinkageclasses(incidencematgraph(rn))
372-
end
373-
nps.stronglinkageclasses
374-
end
375-
376-
stronglinkageclasses(incidencegraph) = Graphs.strongly_connected_components(incidencegraph)
377-
378-
"""
379-
terminallinkageclasses(rn::ReactionSystem)
380-
381-
Return the terminal strongly connected components of a reaction network's incidence graph (i.e. sub-groups of reaction complexes that are 1) strongly connected and 2) every reaction in the component produces a complex in the component).
382-
"""
383-
384-
function terminallinkageclasses(rn::ReactionSystem)
385-
nps = get_networkproperties(rn)
386-
if isempty(nps.terminallinkageclasses)
387-
slcs = stronglinkageclasses(rn)
388-
tslcs = filter(lc->isterminal(lc, rn), slcs)
389-
nps.terminallinkageclasses = tslcs
390-
end
391-
nps.terminallinkageclasses
392-
end
393-
394-
function isterminal(lc::Vector, rn::ReactionSystem)
395-
imat = incidencemat(rn)
396-
397-
for r in 1:size(imat, 2)
398-
s = findfirst(==(-1), @view imat[:, r])
399-
if s in Set(lc)
400-
p = findfirst(==(1), @view imat[:, r])
401-
p in Set(lc) ? continue : return false
402-
end
403-
end
404-
true
405-
end
406-
407362
@doc raw"""
408363
deficiency(rn::ReactionSystem)
409364

0 commit comments

Comments
 (0)