You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/callbacks.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,10 @@ specific component or type of component. `NetworkDynamics.jl` provides a way of
24
24
defining those callbacks on a component level and automatically combine them into performant
25
25
[`VectorContinuousCallback`](@extref SciMLBase.VectorContinuousCallback) and [`DiscreteCallback`](@extref SciMLBase.DiscreteCallback) for the whole network.
26
26
27
-
The main entry points are the types [`ContinousComponentCallback`](@ref),
28
-
[`VectorContinousComponentCallback`](@ref) and [`DiscreteComponentCallback`](@ref). All of those objects combine a [`ComponentCondition`](@ref) with an [`ComponentAffect`](@ref).
27
+
The main entry points are the types [`ContinuousComponentCallback`](@ref),
28
+
[`VectorContinuousComponentCallback`](@ref) and [`DiscreteComponentCallback`](@ref). All of those objects combine a [`ComponentCondition`](@ref) with an [`ComponentAffect`](@ref).
29
29
30
-
The "normal" [`ContinousComponentCallback`](@ref) and [`DiscreteComponentCallback`](@ref) have a condition which returns a single value. The corresponding affect is triggered when the return value hits zero.
30
+
The "normal" [`ContinuousComponentCallback`](@ref) and [`DiscreteComponentCallback`](@ref) have a condition which returns a single value. The corresponding affect is triggered when the return value hits zero.
31
31
In contrast, the "vector" version has an in-place condition which writes `len` outputs. When any of those outputs hits zero, the affect is triggered with an additional argument `event_idx` which tells the effect which dimension encountered the zerocrossing.
32
32
33
33
There is a special type [`PresetTimeComponentCallback`](@ref) which has no explicit condition and triggers the affect at given times.
@@ -43,7 +43,7 @@ condition = ComponentCond([:x, :y], [:p1, :p2]) do u, p, t
43
43
returnsome_condition(u[:x], u[:y], ...)
44
44
end
45
45
```
46
-
In case of a `VectorContinousComponentCallback`, the function signature looks slightly different:
46
+
In case of a `VectorContinuousComponentCallback`, the function signature looks slightly different:
47
47
```julia
48
48
vectorcondition =ComponentCond([:x, :y], [:p1, :p2]) do out, u, p, t
49
49
out[1] =some_condition(u[...], p[...])
@@ -77,8 +77,8 @@ However the affect gets passed a `ctx` "context" object, which is a named tuple
77
77
78
78
Lastly we need to define the actual callback object using [`ContinuousComponentCallback`](@ref)/[`VectorContinuousComponentCallback`](@ref):
0 commit comments