49 int num_gene,
City * city_table)
58 for (
i = 1;
i <= num_gene;
i++)
60 city_table[
i].
used = 0;
69 offspring[start_pos] = tour1[start_pos];
73 city_table[(int) tour1[start_pos]].used = 1;
82 while (tour2[curr_pos] != tour1[start_pos])
84 city_table[(int) tour2[curr_pos]].used = 1;
85 curr_pos = city_table[(int) tour2[curr_pos]].tour1_position;
86 offspring[curr_pos] = tour1[curr_pos];
96 for (
i = 1;
i <= num_gene;
i++)
98 if (!city_table[
i].used)
101 tour2[(int) city_table[
i].tour2_position];
111 if (count < num_gene)
115 for (
i = 0;
i < num_gene;
i++)
116 if (tour1[
i] != offspring[
i])
int geqo_randint(PlannerInfo *root, int upper, int lower)
int cx(PlannerInfo *root, Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)