/* $Header: /tmp_mnt/vida/disks/disk5/Users/terry/r/gassy/RCS/app_externs.h,v 1.2 1992/09/22 00:02:54 terry Exp terry $ */ /* * These must all be defined by every application.h */ #if defined(APP_HAS_COMMAND_LINE_OPTIONS) extern OPTION app_options[]; #if defined(APP_WANTS_ADDITIONAL_OPTION_CHECKING) extern VOID app_check_options(); #endif #endif #if defined(APP_NEEDS_TO_INITIALIZE) extern VOID app_initialize(); #endif #if defined(APP_PRINTS_STATS_EACH_GENERATION) extern VOID app_generation(); #if defined(APP_PRINTS_STATS_AT_END) extern VOID app_print_stats(); #endif #endif #if defined(APP_INDIVIDUALS_ARE_PRINTABLE_STRINGS) #define print_individual(fp, individual) fprintf((fp), "%s", (individual)->genome) #else #define app_print_individual print_individual extern VOID app_print_individual(); #endif #if ! defined(APP_INDIVIDUALS_ARE_STRINGS) || ! defined(APP_INDIVIDUALS_HAVE_CONSTANT_SIZE) extern VOID app_random_individual(); #endif #if defined(APP_WANTS_TO_DUMP) extern VOID app_dump_state(); extern VOID app_restore_state(); #endif #if defined(APP_INDIVIDUALS_HAVE_CONSTANT_SIZE) extern INT app_individual_size(); #endif #if defined(APP_NOISY_FITNESS_FUNCTION) VOID app_evaluate_population(); #else FITNESS app_evaluate_individual(); #endif #if defined(APP_INDIVIDUALS_HAVE_CONSTANT_SIZE) && defined(APP_INDIVIDUALS_ARE_STRINGS) #if defined(APP_INDIVIDUALS_ARE_BINARY) #if ! defined(APP_INDIVIDUALS_HAVE_EQUAL_PROB_ALLELES) /* (2) Constant length binary strings with unequal probabilities. */ extern VOID app_allele_probabilities(); #endif #else #if defined(APP_INDIVIDUALS_HAVE_EQUAL_PROB_ALLELES) /* (3) Constant length non binary strings with equal probabilities. */ extern VOID app_allele_possibilities(); #else /* (4) Constant length non binary strings with unequal probabilities. We can't help. */ extern VOID app_initial_population_alleles(); #endif #endif #endif #if defined(APP_INDIVIDUALS_HAVE_CONSTANT_SIZE) && defined(APP_INDIVIDUALS_ARE_STRINGS) && \ defined(APP_ALLELE_PROBS_CHANGE) && ! defined(APP_ALLELE_PROBS_CHANGE_TO_EQUAL) extern VOID app_mutation_allele_probabilities(); #endif #if defined(APP_HAS_ITS_OWN_SURVIVOR_METHODS) extern FUNCTION app_survivor_functions[]; #endif #if defined(APP_HAS_ITS_OWN_CROSSOVER_METHODS) extern FUNCTION app_crossover_functions[]; #endif #if defined(APP_HAS_ITS_OWN_SELECTION_METHODS) extern FUNCTION app_selection_functions[]; #endif #if defined(APP_HAS_ITS_OWN_MUTATION_METHODS) extern FUNCTION app_mutation_functions[]; #endif