def check_terminate(self):
if not self._has_run:<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>terminate = self.check_completion()<EOL>terminate |= (self._num_iter >= self.max_iter)<EOL>return terminate<EOL><DEDENT>
Returns a Bool of whether to terminate.

Checks whether a satisfactory minimum has been found or whether
too many iterations have occurred.