Algorithm 2.
Two-parameter backtracking line search
| Input: , , F(k), , , lmax |
| Output: , |
| 1: |
| 2: found ← false |
| 3: while not found do |
| 4: |
| 5: if then |
| 6: |
| 7: else |
| 8: found ← true |
| 9: end if |
| 10: end while |
| 11: l ← 0 {l is the line search step number.} |
| 12: |
| 13: found ← false |
| 14: while not found and l < lmax do |
| 15: |
| 16: if then |
| 17: |
| 18: else |
| 19: found ← true |
| 20: end if |
| 21: l ← l + 1 |
| 22: end while |
| 23: if l is lmax then |
| 24: |
| 25: end if |