This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function predict(prevtarget::Vector{T}, s = 1.0) where T <: AbstractArray | |
| secant = prevtarget[end] - prevtarget[end-1] | |
| (prevtarget[end] + s*secant, secant) | |
| end | |
| function correct!(expt, target::AbstractVector) | |
| correct!(expt, target, zeros(target)) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using SoftGlobalScope | |
| import REPL | |
| const USE_REVISE = false | |
| function replace_active_backend() | |
| backend = Base.active_repl_backend | |
| # Kill the existing REPL backend | |
| put!(backend.repl_channel, (nothing, -1)) | |
| # Copied from REPL/src/REPL.jl: start_repl_backend |