From d11d0ba1cefd4059551eeea3839d5065b5ba4375 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 25 Apr 2008 11:15:20 +0200 Subject: [PATCH] src/sn-evolution.c: Write best network to output file if given. --- src/sn-evolution.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } } -- 2.11.0