linesearch2 - Bracketing phase Given 1 and 0 0 for i = 1 2...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Bracketing phase Given: α 1 and φ , φ 0 α 0 0 for i = 1 , 2 ,... evaluate φ ( α i ) if φ ( α i ) > φ (0) + c 1 α i φ 0 (0) or ( i > 1 and φ ( α i ) φ ( α i - 1 ) ) then return zoom ( α i - 1 i ) evaluate φ 0 ( α i ) if | φ 0 ( α i ) | ≤ c 2 | φ 0 (0) | then return α i if φ 0 ( α i ) 0 then return zoom ( α i i - 1 ) choose α i +1 > α i end for Zoom phase function zoom ( α lo hi ) repeat interpolate to find α between α lo and α hi evaluate φ ( α ) if φ ( α ) > φ (0) + c 1 αφ 0 (0) /* (W1) fails */ or φ ( α ) φ ( α lo ) then α hi α else evaluate φ 0 ( α ) if | φ 0 ( α ) | ≤ c 2 | φ 0 (0) | /* (W2b) */ then return α if φ 0 ( α )( α hi - α lo ) 0 then
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
α hi α lo ; α lo α else α lo α end repeat end function Loop invariants for start of zoom
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/01/2012 for the course 22M 174 taught by Professor Davidstewart during the Spring '12 term at University of Iowa.

Page1 / 2

linesearch2 - Bracketing phase Given 1 and 0 0 for i = 1 2...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online