Skip to content

Commit a50d86f

Browse files
committed
format
1 parent 98eb805 commit a50d86f

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

docs/src/complete_sii.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function SymbolicIndexingInterface.all_symbols(sys::ExampleSystem)
7979
end
8080

8181
function SymbolicIndexingInterface.default_values(sys::ExampleSystem)
82-
return sys.defaults
82+
return sys.defaults
8383
end
8484
```
8585

@@ -360,26 +360,26 @@ Introducing a type to represent expression trees:
360360

361361
```julia
362362
struct MyExpr
363-
op::Function
364-
args::Vector{Union{MyExpr, MySym, MySymArr, Number, Array}}
363+
op::Function
364+
args::Vector{Union{MyExpr, MySym, MySymArr, Number, Array}}
365365
end
366366
```
367367

368368
[`symbolic_evaluate`](@ref) can be implemented as follows:
369369

370370
```julia
371371
function symbolic_evaluate(expr::Union{MySym, MySymArr}, syms::Dict)
372-
get(syms, expr, expr)
372+
get(syms, expr, expr)
373373
end
374374
function symbolic_evaluate(expr::MyExpr, syms::Dict)
375-
for i in eachindex(expr.args)
376-
if expr.args[i] isa Union{MySym, MySymArr, MyExpr}
377-
expr.args[i] = symbolic_evaluate(expr.args[i], syms)
375+
for i in eachindex(expr.args)
376+
if expr.args[i] isa Union{MySym, MySymArr, MyExpr}
377+
expr.args[i] = symbolic_evaluate(expr.args[i], syms)
378+
end
379+
end
380+
if all(x -> symbolic_type(x) === NotSymbolic(), expr.args)
381+
return expr.op(expr.args...)
378382
end
379-
end
380-
if all(x -> symbolic_type(x) === NotSymbolic(), expr.args)
381-
return expr.op(expr.args...)
382-
end
383383
end
384384
```
385385

@@ -429,7 +429,6 @@ end
429429
SymbolicIndexingInterface.parameter_timeseries(fs::ExampleSolution2) = fs.pt
430430
# Mark the object as a `Timeseries` object
431431
SymbolicIndexingInterface.is_timeseries(::Type{ExampleSolution2}) = Timeseries()
432-
433432
```
434433

435434
Now we can create an example object and observe the new functionality. Note that

docs/src/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,5 +218,5 @@ changing the type of values in the buffer (for example, changing the value of a
218218
from `Float64` to `Float32`).
219219

220220
```@example Usage
221-
remake_buffer(sys, prob.p, Dict(σ => 1f0, ρ => 2f0, β => 3f0))
221+
remake_buffer(sys, prob.p, Dict(σ => 1.0f0, ρ => 2.0f0, β => 3.0f0))
222222
```

src/parameter_indexing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ By default, this function returns `parameter_values(p)` regardless of `i`, and o
3131
to be specialized for timeseries objects where parameter values are not constant at all
3232
times. The resultant object should be indexable using [`parameter_values`](@ref).
3333
34-
If this function is implemented, [`parameter_values_at_state_time`](@ref) must be
34+
If this function is implemented, [`parameter_values_at_state_time`](@ref) must be
3535
implemented for [`getu`](@ref) to work correctly.
3636
"""
3737
function parameter_values_at_time end

src/trait.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ not present as keys in `syms`.
7777
The function can take additional keyword arguments to control implementation-specific
7878
behavior.
7979
80-
This is already implemented for
80+
This is already implemented for
8181
`symbolic_evaluate(expr::Union{Symbol, Expr}, syms::Dict)`.
8282
"""
8383
function symbolic_evaluate(expr::Union{Symbol, Expr}, syms::Dict)

0 commit comments

Comments
 (0)