Skip to content

Commit b48676e

Browse files
committed
some edits
1 parent dffc2ef commit b48676e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/networkapi.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,8 +1663,6 @@ Constructively compute whether a network will have complex-balanced equilibrium
16631663
solutions, following the method in [this paper](https://link.springer.com/article/10.1007/s10910-015-0498-2#Sec3). Accepts a map of rates [k1 => 1.0, k2 => 2.0,...]k2
16641664
"""
16651665

1666-
using Combinatorics, LinearAlgebra
1667-
16681666
function iscomplexbalanced(rs::ReactionSystem, rates::Dict{Any, Float64})
16691667
if length(rates) != numparams(rs)
16701668
error("The number of reaction rates must be equal to the number of parameters")
@@ -1694,7 +1692,8 @@ function iscomplexbalanced(rs::ReactionSystem, rates::Dict{Any, Float64})
16941692
S = netstoichmat(rs)
16951693

16961694
# Compute ρ using the matrix-tree theorem
1697-
g = incidencematgraph(rs); R = ratematrix(rs, rates)
1695+
g = incidencematgraph(rs)
1696+
R = ratematrix(rs, rates)
16981697
ρ = matrixtree(g, R)
16991698
@assert isapprox(L*ρ, zeros(nc), atol=1e-12)
17001699

0 commit comments

Comments
 (0)