From: Florian Forster Date: Fri, 25 Apr 2008 09:15:20 +0000 (+0200) Subject: src/sn-evolution.c: Write best network to output file if given. X-Git-Tag: v1.0.0~110 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=d11d0ba1cefd4059551eeea3839d5065b5ba4375;p=sort-networks.git src/sn-evolution.c: Write best network to output file if given. --- diff --git a/src/sn-evolution.c b/src/sn-evolution.c index 9cf56f5..e319660 100644 --- a/src/sn-evolution.c +++ b/src/sn-evolution.c @@ -343,14 +343,16 @@ int main (int argc, char **argv) printf ("Exiting after %llu iterations.\n", iteration_counter); - if (best_output_file == NULL) { sn_network_t *n; n = sn_population_best (population); if (n != NULL) { - sn_network_show (n); + if (best_output_file != NULL) + sn_network_write_file (n, best_output_file); + else + sn_network_show (n); sn_network_destroy (n); } }