substitute_in_reaction_system
Stable function · Expressions
Tier: stable · Kind: function · Topic: Expressions
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | substituteInReactionSystem | substitute_in_reaction_system | substitute_in_reaction_system | SubstituteInReactionSystem |
Julia
Julia does not export this function.
TypeScript
function substituteInReactionSystem(system: ReactionSystem, bindings: Record<string, Expr>, context?: SubstitutionContext): ReactionSystem
Apply substitution across all rate expressions in a reaction system. Returns a new reaction system with substitutions applied (immutable).
Parameters
system— ReactionSystem to substitute intobindings— Variable name to expression mappingscontext— Optional context for resolving scoped references
Returns
New reaction system with substitutions applied
Python
substitute_in_reaction_system(system, bindings: dict[str, Expr])
Apply substitutions to all expressions in a reaction system.
Parameters
system— Reaction system object or dict to perform substitutions onbindings(dict[str, Expr]) — Dictionary mapping variable names to replacement expressions
Returns
New reaction system (same type as input) with substitutions applied
Rust
pub fn substitute_in_reaction_system(reaction_system: &ReactionSystem, substitutions: &HashMap<String, Expr>) -> ReactionSystem
Substitute variables in all reaction-rate expressions within a reaction system.