slight refactor for clarity
This commit is contained in:
parent
3d86d5f530
commit
0327c9101e
@ -373,8 +373,8 @@ end
|
|||||||
# try some intervals over which the function may be defined
|
# try some intervals over which the function may be defined
|
||||||
function tryrange(F::T, vec) where T <: AbstractArray
|
function tryrange(F::T, vec) where T <: AbstractArray
|
||||||
rets = [tryrange(f, vec) for f in F] # get the preferred for each
|
rets = [tryrange(f, vec) for f in F] # get the preferred for each
|
||||||
inds = indexin(rets, vec) # get the last attempt (most likely to fit all)
|
maxind = maximum(indexin(rets, vec)) # get the last attempt that succeeded (most likely to fit all)
|
||||||
rets .= [tryrange(f, vec[maximum(inds):maximum(inds)]) for f in F] # ensure that all functions compute there
|
rets .= [tryrange(f, vec[maxind:maxind]) for f in F] # ensure that all functions compute there
|
||||||
rets[1]
|
rets[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user