lesson 22/11, heavy ball method not translated yet

This commit is contained in:
elvis
2023-11-25 20:16:56 +01:00
parent b1c433832f
commit f36dec52dd
5 changed files with 3506 additions and 10 deletions

View File

@ -80,9 +80,8 @@ function NWTN(f;
if printing
@printf(" %2d", lsiter)
end
a = as;
a = as
return (a, phia) # Armijo + strong Wolfe satisfied, we are done
end
if phips 0
break
@ -272,7 +271,7 @@ function NWTN(f;
# output statistics - - - - - - - - - - - - - - - - - - - - - - - - - -
if fStar > -Inf
gapk = ( v - fStar ) / max(abs( fStar ), 1)
gapk = (v - fStar) / max(abs(fStar), 1)
if printing
@printf("%4d\t%1.4e\t%1.4e", feval, gapk, ng)