@@ -377,20 +377,20 @@ function set_state!(u::AbstractArray, value::Real, i, ds::DynamicalSystem)
377377end
378378
379379"""
380- set_state!(ds::DynamicalSystem, mapping::Dict )
380+ set_state!(ds::DynamicalSystem, mapping::AbstractDict )
381381
382382Convenience version of `set_state!` that iteratively calls `set_state!(ds, val, i)`
383383for all index-value pairs `(i, val)` in `mapping`. This allows you to
384384partially set only some state variables.
385385"""
386- function set_state! (ds:: DynamicalSystem , mapping:: Dict )
386+ function set_state! (ds:: DynamicalSystem , mapping:: AbstractDict )
387387 # ensure we use a mutable vector, so same code works for in-place problems
388388 # (SymbolicIndexingInterface only works with mutable objects)
389389 um = Array (copy (current_state (ds)))
390390 set_state! (um, mapping, ds)
391391 set_state! (ds, um)
392392end
393- function set_state! (um:: Array{<:Real} , mapping:: Dict , ds:: DynamicalSystem )
393+ function set_state! (um:: Array{<:Real} , mapping:: AbstractDict , ds:: DynamicalSystem )
394394 for (i, value) in pairs (mapping)
395395 set_state! (um, value, i, ds)
396396 end
438438Set the parameter values in the [`current_parameters`](@ref)`(ds)` to match those in `p`.
439439This is done as an in-place overwrite by looping over the keys of `p`
440440hence `p` can be an arbitrary container mapping parameter indices to values
441- (such as a `Vector{Real}`, `Vector{Pair}`, or `Dict `).
441+ (such as a `Vector{Real}`, `Vector{Pair}`, or `AbstractDict `).
442442
443443The keys of `p` must be valid keys that can be given to [`set_parameter!`](@ref).
444444"""
@@ -481,10 +481,10 @@ with initial state `u`. Practically every function of the ecosystem that evolves
481481`ds` first calls this function on it. Besides the new state `u`, you
482482can also configure the keywords `t0 = initial_time(ds)` and `p = current_parameters(ds)`.
483483
484- reinit!(ds::DynamicalSystem, u::Dict ; kwargs...) → ds
484+ reinit!(ds::DynamicalSystem, u::AbstractDict ; kwargs...) → ds
485485
486- If `u` is a `Dict ` (for partially setting specific state variables in [`set_state`](@ref)),
487- then the alterations in `u` are still done in the state given by the keyword
486+ If `u` is a `AbstractDict ` (for partially setting specific state variables in [`set_state! `](@ref)),
487+ then the alterations are done in the state given by the keyword
488488`reference_state = copy(initial_state(ds))`.
489489
490490 reinit!(ds, ::Nothing; kwargs...)
@@ -493,7 +493,7 @@ This method does nothing and leaves the system as is. This is so that downstream
493493that call `reinit!` can still be used without resetting the system but rather
494494continuing from its exact current state.
495495"""
496- function SciMLBase. reinit! (ds:: DynamicalSystem , mapping:: Dict ;
496+ function SciMLBase. reinit! (ds:: DynamicalSystem , mapping:: AbstractDict ;
497497 reference_state = copy (initial_state (ds)), kwargs... )
498498 um = Array (reference_state)
499499 set_state! (um, mapping, ds)
0 commit comments