Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow skipping derivative computations #180

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/branchandbound.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ end
function _branch_bound(bab::BranchAndBoundEnclosure, f::Function, X::Interval_or_IntervalBox, df;
initial=emptyinterval(first(X)),
cnt=1)
dfX = df(X)
range_extrema, flag = _monotonicity_check(f, X, dfX)
flag && return hull(range_extrema, initial)
if !isnothing(df)
dfX = df(X)
range_extrema, flag = _monotonicity_check(f, X, dfX)
flag && return hull(range_extrema, initial)
end

fX = f(X) # TODO: allow user to choose how to evaluate this (mean value, natural enclosure)
# if tolerance or maximum number of iteration is met, return current enclosure
Expand Down
Loading