|
1 | 1 | """ |
2 | 2 | ```julia |
3 | | -Itp(; k1 = Val{1}(), k2 = Val{2}(), n0 = Val{1}()) |
| 3 | +Itp(; k1::Real = 0.007, k2::Real = 1.5, n0::Int = 10) |
4 | 4 | ``` |
| 5 | +
|
5 | 6 | ITP (Interpolate Truncate & Project) |
6 | 7 |
|
| 8 | +Use the [ITP method](https://en.wikipedia.org/wiki/ITP_method) to find |
| 9 | +a root of a bracketed function, with a convergence rate between 1 and 1.62. |
7 | 10 |
|
8 | | -""" |
| 11 | +This method was introduced in the paper "An Enhancement of the Bisection Method |
| 12 | +Average Performance Preserving Minmax Optimality" |
| 13 | +(https://doi.org/10.1145/3423597) by I. F. D. Oliveira and R. H. C. Takahashi. |
| 14 | +
|
| 15 | +# Tuning Parameters |
| 16 | +
|
| 17 | +The following keyword parameters are accepted. |
| 18 | +
|
| 19 | +- `n₀::Int = 1`, the 'slack'. Must not be negative.\n |
| 20 | + When n₀ = 0 the worst-case is identical to that of bisection, |
| 21 | + but increacing n₀ provides greater oppotunity for superlinearity. |
| 22 | +- `κ₁::Float64 = 0.1`. Must not be negative.\n |
| 23 | + The recomended value is `0.2/(x₂ - x₁)`. |
| 24 | + Lower values produce tighter asymptotic behaviour, while higher values |
| 25 | + improve the steady-state behaviour when truncation is not helpful. |
| 26 | +- `κ₂::Real = 2`. Must lie in [1, 1+ϕ ≈ 2.62).\n |
| 27 | + Higher values allow for a greater convergence rate, |
| 28 | + but also make the method more succeptable to worst-case performance. |
| 29 | + In practice, κ=1,2 seems to work well due to the computational simplicity, |
| 30 | + as κ₂ is used as an exponent in the method. |
9 | 31 |
|
10 | | -struct Itp <: AbstractBracketingAlgorithm |
11 | | - k1::Real |
12 | | - k2::Real |
| 32 | +### Worst Case Performance |
| 33 | +
|
| 34 | +n½ + `n₀` iterations, where n½ is the number of iterations using bisection |
| 35 | +(n½ = ⌈log2(Δx)/2`tol`⌉). |
| 36 | +
|
| 37 | +### Asymptotic Performance |
| 38 | +
|
| 39 | +If `f` is twice differentiable and the root is simple, |
| 40 | +then with `n₀` > 0 the convergence rate is √`κ₂`. |
| 41 | +""" |
| 42 | +struct Itp <: AbstractBracketingAlgorithm{T} |
| 43 | + k1::T |
| 44 | + k2::T |
13 | 45 | n0::Int |
14 | 46 | function Itp(; k1::Real = 0.007, k2::Real = 1.5, n0::Int = 10) |
15 | 47 | if k1 < 0 |
|
0 commit comments