R/engine_hybrid.R
stop_engine_if_stalling.Rdan utility function to easily generate a stop function that stops when the convergence is stalling
stop_engine_if_stalling(nb_iterations)a function: (engine) –> logical that stops (i.e/ returns TRUE) if the convergence is stalling
until <- stop_engine_on_first_of(max_generations = 1000, other_func = stop_engine_if_stalling(5))