@@ -6,8 +6,8 @@ function test_lbfgs()
6
6
@testset ExtendedTestSet " LBFGS" begin
7
7
n = 10
8
8
mem = 5
9
- B = LBFGSOperator (n, mem, scaling= false )
10
- H = InverseLBFGSOperator (n, mem, scaling= false )
9
+ B = LBFGSOperator (n, mem= mem , scaling= false )
10
+ H = InverseLBFGSOperator (n, mem= mem , scaling= false )
11
11
12
12
for t = 1 : 2 # Run again after reset!
13
13
@test norm (diag (B) - diag (Matrix (B))) <= rtol
@@ -64,7 +64,7 @@ function test_lbfgs()
64
64
65
65
# test against full BFGS without scaling
66
66
mem = n
67
- LB = LBFGSOperator (n, mem, scaling= false )
67
+ LB = LBFGSOperator (n, mem= mem , scaling= false )
68
68
B = Matrix (1.0 I, n, n)
69
69
70
70
function bfgs! (B, s, y, damped= false )
@@ -91,8 +91,8 @@ function test_lbfgs()
91
91
end
92
92
93
93
# test damped L-BFGS
94
- B = LBFGSOperator (n, mem, damped= true , scaling= false , σ₂= 0.8 , σ₃= Inf )
95
- H = InverseLBFGSOperator (n, mem, damped= true , scaling= false , σ₂= 0.8 , σ₃= Inf )
94
+ B = LBFGSOperator (n, mem= mem , damped= true , scaling= false , σ₂= 0.8 , σ₃= Inf )
95
+ H = InverseLBFGSOperator (n, mem= mem , damped= true , scaling= false , σ₂= 0.8 , σ₃= Inf )
96
96
97
97
insert_B = insert_H = 0
98
98
for i = 1 : mem+ 2
@@ -126,7 +126,7 @@ function test_lbfgs()
126
126
127
127
# test against full BFGS without scaling
128
128
mem = n
129
- LB = LBFGSOperator (n, mem, damped= true , scaling= false )
129
+ LB = LBFGSOperator (n, mem= mem , damped= true , scaling= false )
130
130
B = Matrix (1.0 I, n, n)
131
131
132
132
@test norm (Matrix (LB) - B) < rtol * norm (B)
@@ -146,8 +146,8 @@ function test_lbfgs()
146
146
n = 10
147
147
mem = 5
148
148
for T in (Float16, Float32, Float64, BigFloat)
149
- B = LBFGSOperator (T, n, mem)
150
- H = InverseLBFGSOperator (T, n, mem)
149
+ B = LBFGSOperator (T, n, mem= mem )
150
+ H = InverseLBFGSOperator (T, n, mem= mem )
151
151
s = ones (T, n)
152
152
y = ones (T, n)
153
153
push! (B, s, y)
0 commit comments