- best_rating = sn_population_best_rating (population);
- printf ("After approximately %i iterations: Currently best rating: %i\n", i, best_rating);
+ iter = iteration_counter;
+
+ n = population_get_fittest (population);
+
+ rating = rate_network (n);
+
+ stages_num = SN_NETWORK_STAGE_NUM (n);
+ comparators_num = 0;
+ for (i = 0; i < stages_num; i++)
+ {
+ sn_stage_t *s;
+
+ s = SN_NETWORK_STAGE_GET (n, i);
+ comparators_num += SN_STAGE_COMP_NUM (s);
+ }
+
+ sn_network_destroy (n);
+
+ printf ("Best after approximately %i iterations: "
+ "%i comparators in %i stages. Rating: %i.\n",
+ iter, comparators_num, stages_num, rating);