📄 gaul.h
字号:
* (Basic entity and population handling) */FUNCPROTO population *ga_population_new( const int stable_size, const int num_chromosome, const int len_chromosome);FUNCPROTO population *ga_population_clone_empty( population *pop );FUNCPROTO population *ga_population_clone( population *pop );FUNCPROTO int ga_get_num_populations(void);FUNCPROTO population *ga_get_population_from_id(unsigned int id);FUNCPROTO unsigned int ga_get_population_id(population *pop);FUNCPROTO unsigned int *ga_get_all_population_ids(void);FUNCPROTO population **ga_get_all_populations(void);FUNCPROTO boolean ga_entity_seed(population *pop, entity *e);FUNCPROTO boolean ga_population_seed(population *pop);FUNCPROTO double ga_entity_evaluate(population *pop, entity *entity);FUNCPROTO boolean ga_population_score_and_sort(population *pop);FUNCPROTO boolean ga_population_sort(population *pop);FUNCPROTO int ga_get_entity_rank(population *pop, entity *e);FUNCPROTO int ga_get_entity_id(population *pop, entity *e);FUNCPROTO entity *ga_get_entity_from_id(population *pop, const unsigned int id);FUNCPROTO entity *ga_get_entity_from_rank(population *pop, const unsigned int rank);FUNCPROTO int ga_get_entity_rank_from_id(population *pop, int id);FUNCPROTO int ga_get_entity_id_from_rank(population *pop, int rank);FUNCPROTO boolean ga_entity_dereference_by_rank(population *pop, int rank);FUNCPROTO boolean ga_entity_dereference(population *p, entity *dying);FUNCPROTO boolean ga_entity_dereference_by_id(population *pop, int id);FUNCPROTO void ga_entity_clear_data(population *p, entity *entity, const int chromosome);FUNCPROTO void ga_entity_blank(population *p, entity *entity);FUNCPROTO entity *ga_get_free_entity(population *pop);FUNCPROTO boolean ga_copy_data(population *pop, entity *dest, entity *src, const int chromosome);FUNCPROTO boolean ga_entity_copy_all_chromosomes(population *pop, entity *dest, entity *src);FUNCPROTO boolean ga_entity_copy_chromosome(population *pop, entity *dest, entity *src, int chromo);FUNCPROTO boolean ga_entity_copy(population *pop, entity *dest, entity *src);FUNCPROTO entity *ga_entity_clone(population *pop, entity *parent);FUNCPROTO void ga_population_send_by_mask( population *pop, int dest_node, int num_to_send, boolean *send_mask );FUNCPROTO void ga_population_send_every( population *pop, int dest_node );FUNCPROTO void ga_population_append_receive( population *pop, int src_node );FUNCPROTO population *ga_population_new_receive( int src_node );FUNCPROTO population *ga_population_receive( int src_node );FUNCPROTO void ga_population_send( population *pop, int dest_node );FUNCPROTO void ga_population_send_all( population *pop, int dest_node );FUNCPROTO entity *ga_optimise_entity(population *pop, entity *unopt);FUNCPROTO void ga_population_set_parameters( population *pop, const ga_scheme_type scheme, const ga_elitism_type elitism, const double crossover, const double mutation, const double migration);FUNCPROTO void ga_population_set_scheme( population *pop, const ga_scheme_type scheme);FUNCPROTO void ga_population_set_elitism( population *pop, const ga_elitism_type elitism);FUNCPROTO void ga_population_set_crossover( population *pop, const double crossover);FUNCPROTO void ga_population_set_mutation( population *pop, const double mutation);FUNCPROTO void ga_population_set_migration( population *pop, const double migration);FUNCPROTO void ga_population_set_allele_mutation_prob( population *pop, const double prob);FUNCPROTO void ga_population_set_allele_min_integer( population *pop, const int value);FUNCPROTO void ga_population_set_allele_max_integer( population *pop, const int value);FUNCPROTO void ga_population_set_allele_min_double( population *pop, const double value);FUNCPROTO void ga_population_set_allele_max_double( population *pop, const double value);FUNCPROTO double ga_population_get_crossover(population *pop);FUNCPROTO double ga_population_get_mutation(population *pop);FUNCPROTO double ga_population_get_migration(population *pop);FUNCPROTO double ga_population_get_allele_mutation_prob(population *pop);FUNCPROTO int ga_population_get_allele_min_integer(population *pop);FUNCPROTO int ga_population_get_allele_max_integer(population *pop);FUNCPROTO double ga_population_get_allele_min_double(population *pop);FUNCPROTO double ga_population_get_allele_max_double(population *pop);FUNCPROTO ga_scheme_type ga_population_get_scheme(population *pop);FUNCPROTO ga_elitism_type ga_population_get_elitism(population *pop);FUNCPROTO population *ga_transcend(unsigned int id);FUNCPROTO unsigned int ga_resurect(population *pop);FUNCPROTO boolean ga_extinction(population *extinct);FUNCPROTO boolean ga_genocide(population *pop, int target_size);FUNCPROTO boolean ga_genocide_by_fitness(population *pop, double target_fitness);FUNCPROTO boolean ga_population_set_data(population *pop, vpointer data);FUNCPROTO vpointer ga_population_get_data(population *pop);FUNCPROTO boolean ga_entity_set_data(population *pop, entity *e, SLList *data);FUNCPROTO SLList *ga_entity_get_data(population *pop, entity *e);FUNCPROTO int ga_population_get_generation(population *pop);FUNCPROTO double ga_entity_get_fitness(entity *e);FUNCPROTO boolean ga_entity_set_fitness(entity *e, double fitness);FUNCPROTO int ga_population_get_stablesize(population *pop);FUNCPROTO int ga_population_get_size(population *pop);FUNCPROTO int ga_population_get_maxsize(population *pop);FUNCPROTO boolean ga_population_set_stablesize(population *pop, int stable_size);FUNCPROTO int ga_funclookup_ptr_to_id(void *func);FUNCPROTO int ga_funclookup_label_to_id(char *funcname);FUNCPROTO void *ga_funclookup_label_to_ptr(char *funcname);FUNCPROTO void *ga_funclookup_id_to_ptr(int id);FUNCPROTO char *ga_funclookup_id_to_label(int id);FUNCPROTO void ga_init_openmp( void );/* * Functions located in ga_io.c: * (Disk I/O) */FUNCPROTO boolean ga_population_write(population *pop, char *fname);FUNCPROTO population *ga_population_read(char *fname);FUNCPROTO boolean ga_entity_write(population *pop, entity *entity, char *fname);FUNCPROTO entity *ga_entity_read(population *pop, char *fname);/* * Functions located in ga_select.c: * (Selection operators) */FUNCPROTO boolean ga_select_one_random(population *pop, entity **mother);FUNCPROTO boolean ga_select_two_random(population *pop, entity **mother, entity **father);FUNCPROTO boolean ga_select_one_every(population *pop, entity **mother);FUNCPROTO boolean ga_select_two_every(population *pop, entity **mother, entity **father);FUNCPROTO boolean ga_select_one_randomrank(population *pop, entity **mother);FUNCPROTO boolean ga_select_two_randomrank(population *pop, entity **mother, entity **father);FUNCPROTO boolean ga_select_one_bestof2(population *pop, entity **mother);FUNCPROTO boolean ga_select_two_bestof2(population *pop, entity **mother, entity **father);FUNCPROTO boolean ga_select_one_bestof3(population *pop, entity **mother);FUNCPROTO boolean ga_select_two_bestof3(population *pop, entity **mother, entity **father);FUNCPROTO boolean ga_select_one_roulette( population *pop, entity **mother );FUNCPROTO boolean ga_select_two_roulette( population *pop, entity **mother, entity **father );FUNCPROTO boolean ga_select_one_roulette_rebased( population *pop, entity **mother );FUNCPROTO boolean ga_select_two_roulette_rebased( population *pop, entity **mother, entity **father );FUNCPROTO boolean ga_select_one_sus( population *pop, entity **mother );FUNCPROTO boolean ga_select_two_sus( population *pop, entity **mother, entity **father );FUNCPROTO boolean ga_select_one_sussq( population *pop, entity **mother );FUNCPROTO boolean ga_select_two_sussq( population *pop, entity **mother, entity **father );FUNCPROTO boolean ga_select_one_aggressive( population *pop, entity **mother );FUNCPROTO boolean ga_select_two_aggressive( population *pop, entity **mother, entity **father );FUNCPROTO boolean ga_select_one_best( population *pop, entity **mother );FUNCPROTO boolean ga_select_two_best( population *pop, entity **mother, entity **father );FUNCPROTO boolean ga_select_one_linearrank( population *pop, entity **mother );FUNCPROTO boolean ga_select_two_linearrank( population *pop, entity **mother, entity **father );FUNCPROTO boolean ga_select_one_roundrobin( population *pop, entity **mother );/* * Functions located in ga_crossover.c: * (Crossover operators) */FUNCPROTO void ga_crossover_integer_singlepoints(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_integer_doublepoints(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_integer_mean(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_integer_mixing(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_integer_allele_mixing( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_boolean_singlepoints(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_boolean_doublepoints(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_boolean_mixing(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_boolean_allele_mixing( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_char_singlepoints( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_char_doublepoints( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_char_mixing(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_char_allele_mixing( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_double_singlepoints( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_double_doublepoints( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_double_mixing(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_double_mean(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_double_allele_mixing( population *pop, entity *father, entity *mother, entity *son, entity *daughter );FUNCPROTO void ga_crossover_bitstring_singlepoints(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_bitstring_doublepoints(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_bitstring_mixing(population *pop, entity *father, entity *mother, entity *son, entity *daughter);FUNCPROTO void ga_crossover_bitstring_allele_mixing( population *pop, entity *father, entity *mother, entity *son, entity *daughter );/* * Functions located in ga_mutate.c: * (Mutation operators) */FUNCPROTO void ga_mutate_integer_singlepoint_drift(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_integer_singlepoint_randomize(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_integer_multipoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_integer_allpoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_boolean_singlepoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_boolean_multipoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_char_singlepoint_drift(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_char_singlepoint_randomize(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_char_allpoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_char_multipoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_printable_singlepoint_drift(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_printable_singlepoint_randomize(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_printable_allpoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_printable_multipoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_bitstring_singlepoint(population *pop, entity *father, entity *son);FUNCPROTO void ga_mutate_bitstring_multipoint(population *pop, entity *father, entity *son);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -