Skip to content

Commit d507ff9

Browse files
docs: add docs for empty_substitutions and get_substitutions
1 parent 04c02bc commit d507ff9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/utils.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,10 +693,21 @@ end
693693

694694
isarray(x) = x isa AbstractArray || x isa Symbolics.Arr
695695

696+
"""
697+
$(TYPEDSIGNATURES)
698+
699+
Check if any variables were eliminated from the system as part of `mtkcompile`.
700+
"""
696701
function empty_substitutions(sys)
697702
isempty(observed(sys))
698703
end
699704

705+
"""
706+
$(TYPEDSIGNATURES)
707+
708+
Get a dictionary mapping variables eliminated from the system during `mtkcompile` to the
709+
expressions used to calculate them.
710+
"""
700711
function get_substitutions(sys)
701712
Dict([eq.lhs => eq.rhs for eq in observed(sys)])
702713
end

0 commit comments

Comments
 (0)