@@ -90,8 +90,8 @@ function is_finished(problem::Problem, algorithm::Algorithm, state::State)
9090 problem,
9191 algorithm,
9292 state,
93- get_stopping_criterion ( algorithm) ,
94- get_stopping_criterion_state ( state) ,
93+ algorithm. stopping_criterion ,
94+ state. stopping_criterion_state ,
9595 )
9696end
9797
@@ -104,8 +104,8 @@ function is_finished!(problem::Problem, algorithm::Algorithm, state::State)
104104 problem,
105105 algorithm,
106106 state,
107- get_stopping_criterion ( algorithm) ,
108- get_stopping_criterion_state ( state) ,
107+ algorithm. stopping_criterion ,
108+ state. stopping_criterion_state ,
109109 )
110110end
111111
@@ -303,7 +303,7 @@ function is_finished(
303303 stop_when_all:: StopWhenAll ,
304304 stopping_criterion_states:: GroupStoppingCriterionState ,
305305)
306- k = get_iteration ( state)
306+ k = state. iteration
307307 (k == 0 ) && (stopping_criterion_states. at_iteration = - 1 ) # reset on init
308308 if all (
309309 st -> is_finished (problem, algorithm, state, st[1 ], st[2 ]),
@@ -320,7 +320,7 @@ function is_finished!(
320320 stop_when_all:: StopWhenAll ,
321321 stopping_criterion_states:: GroupStoppingCriterionState ,
322322)
323- k = get_iteration ( state)
323+ k = state. iteration
324324 (k == 0 ) && (stopping_criterion_states. at_iteration = - 1 ) # reset on init
325325 if all (
326326 st -> is_finished! (problem, algorithm, state, st[1 ], st[2 ]),
@@ -339,7 +339,7 @@ function is_finished(
339339 stop_when_any:: StopWhenAny ,
340340 stopping_criterion_states:: GroupStoppingCriterionState ,
341341)
342- k = get_iteration ( state)
342+ k = state. iteration
343343 (k == 0 ) && (stopping_criterion_states. at_iteration = - 1 ) # reset on init
344344 if any (
345345 st -> is_finished (problem, algorithm, state, st[1 ], st[2 ]),
@@ -356,7 +356,7 @@ function is_finished!(
356356 stop_when_any:: StopWhenAny ,
357357 stopping_criterion_states:: GroupStoppingCriterionState ,
358358)
359- k = get_iteration ( state)
359+ k = state. iteration
360360 (k == 0 ) && (stopping_criterion_states. at_iteration = - 1 ) # reset on init
361361 if all (
362362 st -> is_finished! (problem, algorithm, state, st[1 ], st[2 ]),
@@ -460,7 +460,7 @@ function is_finished(
460460 stop_after_iteration:: StopAfterIteration ,
461461 stopping_criterion_state:: DefaultStoppingCriterionState ,
462462)
463- return get_iteration ( state) >= stop_after_iteration. max_iterations
463+ return state. iteration >= stop_after_iteration. max_iterations
464464end
465465function is_finished! (
466466 :: Problem ,
@@ -469,7 +469,7 @@ function is_finished!(
469469 stop_after_iteration:: StopAfterIteration ,
470470 stopping_criterion_state:: DefaultStoppingCriterionState ,
471471)
472- k = get_iteration ( state)
472+ k = state. iteration
473473 (k == 0 ) && (stopping_criterion_state. at_iteration = - 1 )
474474 if k >= stop_after_iteration. max_iterations
475475 stopping_criterion_state. at_iteration = k
@@ -570,7 +570,7 @@ function is_finished(
570570 stop_after:: StopAfter ,
571571 stop_after_state:: StopAfterTimePeriodState ,
572572)
573- k = get_iteration ( state)
573+ k = state. iteration
574574 # Just check whether the (last recorded) time is beyond the threshold
575575 return (k > 0 && (stop_after_state. time > Nanosecond (stop_after. threshold)))
576576end
@@ -581,7 +581,7 @@ function is_finished!(
581581 stop_after:: StopAfter ,
582582 stop_after_state:: StopAfterTimePeriodState ,
583583)
584- k = get_iteration ( state)
584+ k = state. iteration
585585 if value (stop_after_state. start) == 0 || k <= 0 # (re)start timer
586586 stop_after_state. at_iteration = - 1
587587 stop_after_state. start = Nanosecond (time_ns ())
0 commit comments