47 namespace IterationPack {
52 <<
"\ntrack.output_iteration(algo) called for the iteration k = "
53 << algo.
state().
k() << std::endl;
55 <<
"\nStep times for the current iteration (in seconds):\n";
57 std::vector<double> step_times(n+1);
59 o <<
" step_id:time = ";
60 for(
int l = 0; l < n+1; ++l )
61 o <<
" " << (l+1) <<
":" << step_times[l];
62 o <<
"\n total time = " << step_times[n] << std::endl;
67 char algo_return_name[6][50] =
72 ,
"MAX_RUN_TIME_EXCEEDED"
73 ,
"INTERRUPTED_TERMINATE_TRUE"
74 ,
"INTERRUPTED_TERMINATE_FALSE"
77 o <<
"\ntrack.output_final(algo,algo_return) called for the iteration k = "
78 << algo.
state().
k() <<
" and algo_return = " << algo_return_name[algo_return]
80 o <<
"Timing (in seconds) statistics for step 0 : ";
81 double total, average,
min,
max, percent;
83 o <<
"total = " << total <<
", average = " << average <<
", min = " << min
84 <<
", max = " << max <<
", percent = " << percent << std::endl;
void get_step_times_k(int offset, double step_times[]) const
Returns the step_times for iteration offset.
void get_final_step_stats(size_t step, double *total, double *average, double *min, double *max, double *percent) const
Returns the final statistics for a given step Do not call when algorithm is running.
virtual int num_steps() const
Return the number of main steps.
virtual std::ostream & journal_out() const
Return a reference to a std::ostream to be used to output debug information and the like...
void output_final(const Algorithm &algo, EAlgoReturn algo_return) const
void output_iteration(const Algorithm &algo) const
Acts as the central hub for an iterative algorithm.