Lines Matching refs:son

49                                          int *son, int *daughter )  in ga_singlepoint_crossover_integer_chromosome()  argument
54 if (!father || !mother || !son || !daughter) in ga_singlepoint_crossover_integer_chromosome()
60 memcpy(son, mother, location*sizeof(int)); in ga_singlepoint_crossover_integer_chromosome()
63 memcpy(&(son[location]), &(father[location]), (pop->len_chromosomes-location)*sizeof(int)); in ga_singlepoint_crossover_integer_chromosome()
80 int *son, int *daughter) in ga_doublepoint_crossover_integer_chromosome() argument
86 if (!father || !mother || !son || !daughter) in ga_doublepoint_crossover_integer_chromosome()
103 memcpy(son, father, location1*sizeof(int)); in ga_doublepoint_crossover_integer_chromosome()
106 memcpy(&(son[location1]), &(mother[location1]), (location2-location1)*sizeof(int)); in ga_doublepoint_crossover_integer_chromosome()
109 memcpy(&(son[location2]), &(father[location2]), (pop->len_chromosomes-location2)*sizeof(int)); in ga_doublepoint_crossover_integer_chromosome()
127 entity *son, entity *daughter ) in ga_crossover_integer_singlepoints() argument
132 if (!father || !mother || !son || !daughter) in ga_crossover_integer_singlepoints()
140 (int *)son->chromosome[i], in ga_crossover_integer_singlepoints()
159 entity *son, entity *daughter ) in ga_crossover_integer_doublepoints() argument
164 if (!father || !mother || !son || !daughter) in ga_crossover_integer_doublepoints()
172 (int *)son->chromosome[i], in ga_crossover_integer_doublepoints()
192 entity *son, entity *daughter) in ga_crossover_integer_mixing() argument
197 if (!father || !mother || !son || !daughter) in ga_crossover_integer_mixing()
204 memcpy(son->chromosome[i], father->chromosome[i], pop->len_chromosomes*sizeof(int)); in ga_crossover_integer_mixing()
206 ga_copy_data(pop, son, father, i); in ga_crossover_integer_mixing()
212 memcpy(son->chromosome[i], mother->chromosome[i], pop->len_chromosomes*sizeof(int)); in ga_crossover_integer_mixing()
214 ga_copy_data(pop, son, mother, i); in ga_crossover_integer_mixing()
235 entity *son, entity *daughter ) in ga_crossover_integer_mean() argument
241 if (!father || !mother || !son || !daughter) in ga_crossover_integer_mean()
251 ((int *)son->chromosome[i])[j] = sum/2; in ga_crossover_integer_mean()
256 ((int *)son->chromosome[i])[j] = (sum - 1)/2; in ga_crossover_integer_mean()
279 entity *son, entity *daughter ) in ga_crossover_integer_allele_mixing() argument
284 if (!father || !mother || !son || !daughter) in ga_crossover_integer_allele_mixing()
293 ((int *)son->chromosome[i])[j] = ((int *)father->chromosome[i])[j]; in ga_crossover_integer_allele_mixing()
299 ((int *)son->chromosome[i])[j] = ((int *)mother->chromosome[i])[j]; in ga_crossover_integer_allele_mixing()
318 boolean *son, boolean *daughter ) in ga_singlepoint_crossover_boolean_chromosome() argument
323 if (!father || !mother || !son || !daughter) in ga_singlepoint_crossover_boolean_chromosome()
329 memcpy(son, mother, location*sizeof(boolean)); in ga_singlepoint_crossover_boolean_chromosome()
332 memcpy(&(son[location]), &(father[location]), (pop->len_chromosomes-location)*sizeof(boolean)); in ga_singlepoint_crossover_boolean_chromosome()
349 boolean *son, boolean *daughter) in ga_doublepoint_crossover_boolean_chromosome() argument
355 if (!father || !mother || !son || !daughter) in ga_doublepoint_crossover_boolean_chromosome()
372 memcpy(son, father, location1*sizeof(boolean)); in ga_doublepoint_crossover_boolean_chromosome()
375 memcpy(&(son[location1]), &(mother[location1]), (location2-location1)*sizeof(boolean)); in ga_doublepoint_crossover_boolean_chromosome()
378 memcpy(&(son[location2]), &(father[location2]), (pop->len_chromosomes-location2)*sizeof(boolean)); in ga_doublepoint_crossover_boolean_chromosome()
396 entity *son, entity *daughter ) in ga_crossover_boolean_singlepoints() argument
401 if (!father || !mother || !son || !daughter) in ga_crossover_boolean_singlepoints()
409 (boolean *)son->chromosome[i], in ga_crossover_boolean_singlepoints()
428 entity *son, entity *daughter ) in ga_crossover_boolean_doublepoints() argument
433 if (!father || !mother || !son || !daughter) in ga_crossover_boolean_doublepoints()
441 (boolean *)son->chromosome[i], in ga_crossover_boolean_doublepoints()
461 entity *son, entity *daughter ) in ga_crossover_boolean_mixing() argument
466 if (!father || !mother || !son || !daughter) in ga_crossover_boolean_mixing()
473 memcpy(son->chromosome[i], father->chromosome[i], pop->len_chromosomes*sizeof(boolean)); in ga_crossover_boolean_mixing()
475 ga_copy_data(pop, son, father, i); in ga_crossover_boolean_mixing()
481 memcpy(son->chromosome[i], mother->chromosome[i], pop->len_chromosomes*sizeof(boolean)); in ga_crossover_boolean_mixing()
483 ga_copy_data(pop, son, mother, i); in ga_crossover_boolean_mixing()
504 entity *son, entity *daughter ) in ga_crossover_boolean_allele_mixing() argument
509 if (!father || !mother || !son || !daughter) in ga_crossover_boolean_allele_mixing()
518 ((boolean *)son->chromosome[i])[j] = ((boolean *)father->chromosome[i])[j]; in ga_crossover_boolean_allele_mixing()
524 ((boolean *)son->chromosome[i])[j] = ((boolean *)mother->chromosome[i])[j]; in ga_crossover_boolean_allele_mixing()
545 entity *son, entity *daughter ) in ga_crossover_char_mixing() argument
550 if (!father || !mother || !son || !daughter) in ga_crossover_char_mixing()
557 memcpy( son->chromosome[i], father->chromosome[i], in ga_crossover_char_mixing()
561 ga_copy_data(pop, son, father, i); in ga_crossover_char_mixing()
568 memcpy( son->chromosome[i], mother->chromosome[i], in ga_crossover_char_mixing()
571 ga_copy_data(pop, son, mother, i); in ga_crossover_char_mixing()
592 entity *son, entity *daughter ) in ga_crossover_char_allele_mixing() argument
597 if (!father || !mother || !son || !daughter) in ga_crossover_char_allele_mixing()
606 ((char *)son->chromosome[i])[j] = ((char *)father->chromosome[i])[j]; in ga_crossover_char_allele_mixing()
612 ((char *)son->chromosome[i])[j] = ((char *)mother->chromosome[i])[j]; in ga_crossover_char_allele_mixing()
633 entity *son, entity *daughter ) in ga_crossover_double_mixing() argument
638 if (!father || !mother || !son || !daughter) in ga_crossover_double_mixing()
645 memcpy( son->chromosome[i], father->chromosome[i], in ga_crossover_double_mixing()
649 ga_copy_data(pop, son, father, i); in ga_crossover_double_mixing()
656 memcpy( son->chromosome[i], mother->chromosome[i], in ga_crossover_double_mixing()
659 ga_copy_data(pop, son, mother, i); in ga_crossover_double_mixing()
681 entity *son, entity *daughter ) in ga_crossover_double_mean() argument
686 if (!father || !mother || !son || !daughter) in ga_crossover_double_mean()
693 …((double *)son->chromosome[i])[j] = 0.5 * (((double *)father->chromosome[i])[j] + ((double *)mothe… in ga_crossover_double_mean()
715 entity *son, entity *daughter ) in ga_crossover_double_allele_mixing() argument
720 if (!father || !mother || !son || !daughter) in ga_crossover_double_allele_mixing()
729 ((double *)son->chromosome[i])[j] = ((double *)father->chromosome[i])[j]; in ga_crossover_double_allele_mixing()
735 ((double *)son->chromosome[i])[j] = ((double *)mother->chromosome[i])[j]; in ga_crossover_double_allele_mixing()
755 entity *son, entity *daughter ) in ga_crossover_char_singlepoints() argument
761 if (!father || !mother || !son || !daughter) in ga_crossover_char_singlepoints()
769 memcpy( son->chromosome[i], mother->chromosome[i], in ga_crossover_char_singlepoints()
774 memcpy( &(((char *)son->chromosome[i])[location]), in ga_crossover_char_singlepoints()
797 entity *son, entity *daughter ) in ga_crossover_char_doublepoints() argument
804 if (!father || !mother || !son || !daughter) in ga_crossover_char_doublepoints()
823 memcpy( son->chromosome[i], father->chromosome[i], in ga_crossover_char_doublepoints()
828 memcpy( &(((char *)son->chromosome[i])[location1]), in ga_crossover_char_doublepoints()
835 memcpy( &(((char *)son->chromosome[i])[location2]), in ga_crossover_char_doublepoints()
856 …string_singlepoints(population *pop, entity *father, entity *mother, entity *son, entity *daughter) in ga_crossover_bitstring_singlepoints() argument
862 if (!father || !mother || !son || !daughter) in ga_crossover_bitstring_singlepoints()
870 ga_bit_copy(son->chromosome[i], mother->chromosome[i], in ga_crossover_bitstring_singlepoints()
877 ga_bit_copy(son->chromosome[i], father->chromosome[i], in ga_crossover_bitstring_singlepoints()
898 entity *son, entity *daughter ) in ga_crossover_bitstring_doublepoints() argument
905 if (!father || !mother || !son || !daughter) in ga_crossover_bitstring_doublepoints()
924 ga_bit_copy(son->chromosome[i], mother->chromosome[i], in ga_crossover_bitstring_doublepoints()
929 ga_bit_copy(son->chromosome[i], father->chromosome[i], in ga_crossover_bitstring_doublepoints()
934 ga_bit_copy(son->chromosome[i], mother->chromosome[i], in ga_crossover_bitstring_doublepoints()
954 void ga_crossover_bitstring_mixing(population *pop, entity *father, entity *mother, entity *son, en… in ga_crossover_bitstring_mixing() argument
959 if (!father || !mother || !son || !daughter) in ga_crossover_bitstring_mixing()
966 ga_bit_clone(son->chromosome[i], father->chromosome[i], pop->len_chromosomes); in ga_crossover_bitstring_mixing()
968 ga_copy_data(pop, son, father, i); in ga_crossover_bitstring_mixing()
974 ga_bit_clone(son->chromosome[i], mother->chromosome[i], pop->len_chromosomes); in ga_crossover_bitstring_mixing()
976 ga_copy_data(pop, son, mother, i); in ga_crossover_bitstring_mixing()
997 entity *son, entity *daughter ) in ga_crossover_bitstring_allele_mixing() argument
1002 if (!father || !mother || !son || !daughter) in ga_crossover_bitstring_allele_mixing()
1012 ga_bit_set(son->chromosome[i],j); in ga_crossover_bitstring_allele_mixing()
1014 ga_bit_clear(son->chromosome[i],j); in ga_crossover_bitstring_allele_mixing()
1029 ga_bit_set(son->chromosome[i],j); in ga_crossover_bitstring_allele_mixing()
1031 ga_bit_clear(son->chromosome[i],j); in ga_crossover_bitstring_allele_mixing()
1050 double *son, double *daughter ) in ga_singlepoint_crossover_double_chromosome() argument
1055 if (!father || !mother || !son || !daughter) in ga_singlepoint_crossover_double_chromosome()
1061 memcpy(son, mother, location*sizeof(double)); in ga_singlepoint_crossover_double_chromosome()
1064 memcpy(&(son[location]), &(father[location]), (pop->len_chromosomes-location)*sizeof(double)); in ga_singlepoint_crossover_double_chromosome()
1081 double *son, double *daughter) in ga_doublepoint_crossover_double_chromosome() argument
1087 if (!father || !mother || !son || !daughter) in ga_doublepoint_crossover_double_chromosome()
1104 memcpy(son, father, location1*sizeof(double)); in ga_doublepoint_crossover_double_chromosome()
1107 memcpy(&(son[location1]), &(mother[location1]), (location2-location1)*sizeof(double)); in ga_doublepoint_crossover_double_chromosome()
1110 memcpy(&(son[location2]), &(father[location2]), (pop->len_chromosomes-location2)*sizeof(double)); in ga_doublepoint_crossover_double_chromosome()
1126 void ga_crossover_double_singlepoints(population *pop, entity *father, entity *mother, entity *son,… in ga_crossover_double_singlepoints() argument
1131 if (!father || !mother || !son || !daughter) in ga_crossover_double_singlepoints()
1139 (double *)son->chromosome[i], in ga_crossover_double_singlepoints()
1158 entity *son, entity *daughter ) in ga_crossover_double_doublepoints() argument
1163 if (!father || !mother || !son || !daughter) in ga_crossover_double_doublepoints()
1171 (double *)son->chromosome[i], in ga_crossover_double_doublepoints()