(self, max_time=INF, max_iterations=INF)
| 400 | # TODO: increment the complexity level even more if nothing below in the queue |
| 401 | |
| 402 | def timed_process(self, max_time=INF, max_iterations=INF): |
| 403 | # TODO: combine process methods into process_until |
| 404 | iterations = num_new = 0 |
| 405 | if not self.is_active(): |
| 406 | return num_new |
| 407 | print('Sampling for up to {:.3f} seconds'.format(max_time)) #, max_iterations)) |
| 408 | start_time = time.time() # TODO: instead use sample_time |
| 409 | while self.is_active() and (elapsed_time(start_time) < max_time) and (iterations < max_iterations): |
| 410 | iterations += 1 |
| 411 | num_new += self.process_root() |
| 412 | #print('Iterations: {} | New: {} | Time: {:.3f}'.format(iterations, num_new, elapsed_time(start_time))) |
| 413 | return num_new + self.greedily_process() |
| 414 | |
| 415 | ######################### |
| 416 |
no test coverage detected