Skip to content

Commit 430ff86

Browse files
authored
Merge pull request #23 from anriseth/initialstep
Make initial step length a parameter for morethuente and strongwolfe
2 parents ba8c02f + 829e1cc commit 430ff86

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

NEWS.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# LineSearches v0.1.3 release notes
2+
* Algorithms morethuente and strongwolfe now takes an initial step length as an input
3+
[#23](https://github.com/anriseth/LineSearches.jl/pull/23)
24
* The backtracking algorithm now performs quadratic or cubic interpolations
35
[#20](https://github.com/anriseth/LineSearches.jl/pull/20)
46

src/morethuente.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,9 @@ function morethuente!{T}(df,
138138
new_x::Vector,
139139
g::Vector,
140140
lsr::LineSearchResults{T},
141-
c::Real,
141+
stp::Real,
142142
mayterminate::Bool;
143143
n::Integer = length(x),
144-
stp::Real = 1.0,
145144
f_tol::Real = 1e-4,
146145
gtol::Real = 0.9,
147146
x_tol::Real = 1e-8,

src/strongwolfe.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function strongwolfe!{T}(df,
1111
x_new::Vector,
1212
gr_new::Vector,
1313
lsr::LineSearchResults{T},
14-
c::Real,
14+
alpha0::Real,
1515
mayterminate::Bool;
1616
c1::Real = 1e-4,
1717
c2::Real = 0.9,
@@ -25,7 +25,7 @@ function strongwolfe!{T}(df,
2525
# Step-sizes
2626
a_0 = 0.0
2727
a_iminus1 = a_0
28-
a_i = 1.0
28+
a_i = alpha0
2929
a_max = 65536.0
3030

3131
# phi(alpha) = f(x + alpha * p)

0 commit comments

Comments
 (0)