Skip to content

reword a few docs / fix typos #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/systems/dependency_graphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ mutable struct BipartiteGraph{T <: Integer}
ne::Int
"""Forward adjacency list mapping index of source vertices to the vertices they depend on."""
fadjlist::Vector{Vector{T}} # fadjlist[src] = [dest1,dest2,...]
"""Backwrad adjacency list mapping index of vertices that are dependencies to the source vertices that depend on them."""
"""Backward adjacency list mapping index of vertices that are dependencies to the source vertices that depend on them."""
badjlist::Vector{Vector{T}} # badjlist[dst] = [src1,src2,...]
end

Expand All @@ -114,8 +114,8 @@ Convert a collection of equation dependencies, for example as returned by
`equation_dependencies`, to a [`BipartiteGraph`](@ref).

Notes:
- `vtois` should provide `Dict` like mapping from variable dependency in `eqdeps`
to the integer idx of the variable to use in the graph.
- `vtois` should provide a `Dict` like mapping from each `Variable` dependency in
`eqdeps` to the integer idx of the variable to use in the graph.

Example:
Continuing the example started in [`equation_dependencies`](@ref)
Expand Down Expand Up @@ -147,8 +147,8 @@ asgraph(sys::AbstractSystem; variables=states(sys),
variablestoids=Dict(convert(Variable, v) => i for (i,v) in enumerate(variables)))
```

Convert an `AbstractSystem` to a [`BipartiteGraph`](@ref) mapping equations
to variables they depend on.
Convert an `AbstractSystem` to a [`BipartiteGraph`](@ref) mapping the index of equations
to the indices of variables they depend on.

Notes:
- Defaults for kwargs creating a mapping from `equations(sys)` to `states(sys)`
Expand Down Expand Up @@ -178,9 +178,9 @@ For each variable determine the equations that modify it and return as a [`Bipar

Notes:
- Dependencies are returned as a [`BipartiteGraph`](@ref) mapping variable
indices to the indices of equations that map to them.
indices to the indices of equations that modify them.
- `variables` denotes the list of variables to determine dependencies for.
- `variablestoids` denotes a `Dict` mapping `Variable`s to `Int`s.
- `variablestoids` denotes a `Dict` mapping `Variable`s to their `Int` index in `variables`.

Example:
Continuing the example of [`equation_dependencies`](@ref)
Expand Down
2 changes: 1 addition & 1 deletion src/systems/jumps/jumpsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $(FIELDS)

# Example

```
```julia
using ModelingToolkit

@parameters β γ t
Expand Down
2 changes: 1 addition & 1 deletion src/systems/reaction/reactionsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ explicitly on the independent variable (usually time).
# Arguments
- `rx`, the [`Reaction`](@ref).
- `rs`, a [`ReactionSystem`](@ref) containing the reaction.
- Optional: `rxvars`, the `Variable`s the `rx` depends on.
- Optional: `rxvars`, `Variable`s which are not in `rxvars` are ignored as possible dependencies.
- Optional: `haveivdep`, `true` if the [`Reaction`](@ref) `rate` field explicitly depends on the independent variable.
"""
function ismassaction(rx, rs; rxvars = get_variables(rx.rate),
Expand Down