#NEWLINE# def test_line_search_armijo( self ) : #NEWLINE# #INDENT# c = 0 #NEWLINE# for ( name , f , fprime , x , p , old_f ) in self . line_iter ( ) : #NEWLINE# #INDENT# f0 = f ( x ) #NEWLINE# g0 = fprime ( x ) #NEWLINE# self . fcount = 0 #NEWLINE# ( s , fc , fv ) = ls . line_search_armijo ( f , x , p , g0 , f0 ) #NEWLINE# c += 1 #NEWLINE# assert_equal ( self . fcount , fc ) #NEWLINE# assert_fp_equal ( fv , f ( ( x + ( s * p ) ) ) ) #NEWLINE# assert_line_armijo ( x , p , s , f , err_msg = name ) #NEWLINE# #UNINDENT# assert_ ( ( c >= 9 ) )