Skip to content

Commit

Permalink
Use branch and prune as backend for the search (#187)
Browse files Browse the repository at this point in the history
* Use BranchAndPrune
  • Loading branch information
Kolaru authored Feb 19, 2023
1 parent 1cddbe0 commit 544b635
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 656 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ uuid = "d2bf35a9-74e0-55ec-b149-d360ff49b807"
version = "0.5.11"

[deps]
BranchAndPrune = "d3bc4f2e-91e6-11e9-365e-cd067da536ce"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -11,6 +12,7 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
BranchAndPrune = "0.2.1"
ForwardDiff = "0.10"
IntervalArithmetic = "0.15, 0.16, 0.17, 0.18, 0.19, 0.20"
Polynomials = "0.5, 0.6, 0.7, 0.8, 1, 2, 3"
Expand Down
6 changes: 3 additions & 3 deletions docs/src/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Contractors play a central role in the algorithm: they are the only part of it t

## Search object

Now that we have presented the foundation of the internal algorithm, we can discuss the representation of the search. Each search strategy has a type associated, the defined types being `BreadthFirstSearch` and `DepthFirstSearch`.
Now that we have presented the foundation of the internal algorithm, we can discuss the representation of the search. Each search strategy has a type associated, the defined types being `BreadthFirst` and `DepthFirst`.

A search must be given three pieces of information:
1. The region to search;
Expand All @@ -64,8 +64,8 @@ df (generic function with 1 method)
julia> C = Newton(f, df)
Newton{typeof(f),typeof(df)}(f, df)

julia> search = DepthFirstSearch(-10..10, C, 1e-10)
DepthFirstSearch{Interval{Float64},Newton{typeof(f),typeof(df)},
julia> search = DepthFirst(-10..10, C, 1e-10)
DepthFirst{Interval{Float64},Newton{typeof(f),typeof(df)},
Float64}(Root([-10, 10], :unknown), Newton{typeof(f),typeof(df)}(f, df),
1.0e-10)
```
Expand Down
80 changes: 0 additions & 80 deletions examples/root_search_iterator.jl

This file was deleted.

2 changes: 1 addition & 1 deletion src/IntervalRootFinding.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module IntervalRootFinding

using BranchAndPrune
using IntervalArithmetic
using ForwardDiff
using StaticArrays
Expand Down Expand Up @@ -47,7 +48,6 @@ include("krawczyk.jl")

include("complex.jl")
include("contractors.jl")
include("branch_and_bound.jl")
include("roots.jl")
include("newton1d.jl")
include("quadratic.jl")
Expand Down
Loading

0 comments on commit 544b635

Please sign in to comment.