Skip to content

Commit 098cef4

Browse files
authored
reword a few docs (#420)
1 parent 133fa90 commit 098cef4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/systems/dependency_graphs.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ mutable struct BipartiteGraph{T <: Integer}
8787
ne::Int
8888
"""Forward adjacency list mapping index of source vertices to the vertices they depend on."""
8989
fadjlist::Vector{Vector{T}} # fadjlist[src] = [dest1,dest2,...]
90-
"""Backwrad adjacency list mapping index of vertices that are dependencies to the source vertices that depend on them."""
90+
"""Backward adjacency list mapping index of vertices that are dependencies to the source vertices that depend on them."""
9191
badjlist::Vector{Vector{T}} # badjlist[dst] = [src1,src2,...]
9292
end
9393

@@ -114,8 +114,8 @@ Convert a collection of equation dependencies, for example as returned by
114114
`equation_dependencies`, to a [`BipartiteGraph`](@ref).
115115
116116
Notes:
117-
- `vtois` should provide `Dict` like mapping from variable dependency in `eqdeps`
118-
to the integer idx of the variable to use in the graph.
117+
- `vtois` should provide a `Dict` like mapping from each `Variable` dependency in
118+
`eqdeps` to the integer idx of the variable to use in the graph.
119119
120120
Example:
121121
Continuing the example started in [`equation_dependencies`](@ref)
@@ -147,8 +147,8 @@ asgraph(sys::AbstractSystem; variables=states(sys),
147147
variablestoids=Dict(convert(Variable, v) => i for (i,v) in enumerate(variables)))
148148
```
149149
150-
Convert an `AbstractSystem` to a [`BipartiteGraph`](@ref) mapping equations
151-
to variables they depend on.
150+
Convert an `AbstractSystem` to a [`BipartiteGraph`](@ref) mapping the index of equations
151+
to the indices of variables they depend on.
152152
153153
Notes:
154154
- Defaults for kwargs creating a mapping from `equations(sys)` to `states(sys)`
@@ -178,9 +178,9 @@ For each variable determine the equations that modify it and return as a [`Bipar
178178
179179
Notes:
180180
- Dependencies are returned as a [`BipartiteGraph`](@ref) mapping variable
181-
indices to the indices of equations that map to them.
181+
indices to the indices of equations that modify them.
182182
- `variables` denotes the list of variables to determine dependencies for.
183-
- `variablestoids` denotes a `Dict` mapping `Variable`s to `Int`s.
183+
- `variablestoids` denotes a `Dict` mapping `Variable`s to their `Int` index in `variables`.
184184
185185
Example:
186186
Continuing the example of [`equation_dependencies`](@ref)

src/systems/jumps/jumpsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $(FIELDS)
1010
1111
# Example
1212
13-
```
13+
```julia
1414
using ModelingToolkit
1515
1616
@parameters β γ t

src/systems/reaction/reactionsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ explicitly on the independent variable (usually time).
228228
# Arguments
229229
- `rx`, the [`Reaction`](@ref).
230230
- `rs`, a [`ReactionSystem`](@ref) containing the reaction.
231-
- Optional: `rxvars`, the `Variable`s the `rx` depends on.
231+
- Optional: `rxvars`, `Variable`s which are not in `rxvars` are ignored as possible dependencies.
232232
- Optional: `haveivdep`, `true` if the [`Reaction`](@ref) `rate` field explicitly depends on the independent variable.
233233
"""
234234
function ismassaction(rx, rs; rxvars = get_variables(rx.rate),

0 commit comments

Comments
 (0)