File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -223,21 +223,33 @@ Find the minimal dt_delay in all delay channels.
223223"""
224224function find_next_delay_dt! (p, integrator)
225225 de_chan = integrator. de_chan
226- p. dt_delay = find_minimun_dt_delay (de_chan)
226+ p. dt_delay = find_minimum_dt_delay (de_chan)
227227 nothing
228228end
229229
230- function find_minimun_dt_delay (de_chan:: Vector{Vector{T}} ) where {T}
230+
231+ # find the minimum of a vector of vectors
232+ function find_minimum_dt_delay (de_chan:: Vector{Vector{T}} ) where {T}
231233 val_vec = Vector {T} (undef,length (de_chan))
232234 @inbounds for i in eachindex (de_chan)
233235 val_vec[i] = isempty (de_chan[i]) ? typemax (T) : minimum (de_chan[i])
234236 end
235237 minimum (val_vec)
236238end
237239
240+ # find the minimum of a vector of vectors alternative
241+ # function find_minimum_dt_delay(vec::Vector{Vector{T}})::T where {T<:Real}
242+ # minimum(map(subvec -> minimum(subvec), vec))
243+ # end
244+ # minimum of an empty vector
245+ # function minimum_empty(vec::Vector{T})::T where {T<:Real}
246+ # isempty(vec) ? typemax(T) : minimum(vec)
247+ # end
248+
249+
238250function find_next_delay_num! (p, de_chan:: Vector{Vector{T}} ) where {T}
239251 @label restart
240- val = find_minimun_dt_delay (de_chan)
252+ val = find_minimum_dt_delay (de_chan)
241253 if val < eps (T)
242254 shift_delay_channel! (de_chan, eps (T))
243255 update_delay_channel! (de_chan)
You can’t perform that action at this time.
0 commit comments