#NEWLINE# def print_iteration_linear( iteration , cost , cost_reduction , step_norm , optimality ) : #NEWLINE# #INDENT# if ( cost_reduction is None ) : #NEWLINE# #INDENT# cost_reduction = ( ' ' * 15 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cost_reduction = '{0:^15.2e}' . format ( cost_reduction ) #NEWLINE# #UNINDENT# if ( step_norm is None ) : #NEWLINE# #INDENT# step_norm = ( ' ' * 15 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# step_norm = '{0:^15.2e}' . format ( step_norm ) #NEWLINE# #UNINDENT# print ( '{0:^15}{1:^15.4e}{2}{3}{4:^15.2e}' . format ( iteration , cost , cost_reduction , cost , optimality ) )