This commit is contained in:
Michael K. Borregaard 2017-10-04 11:47:20 +02:00
parent 0327c9101e
commit 5567038cec

View File

@ -371,7 +371,7 @@ end
end 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::AbstractArray, vec)
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
maxind = maximum(indexin(rets, vec)) # get the last attempt that succeeded (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[maxind:maxind]) 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