50 new_pool->string_length = string_length;
75 for (
i = 0;
i < pool->
size;
i++)
115 if (
i == 0 && bad >= 10000)
116 elog(
ERROR,
"geqo failed to make a valid plan");
122 elog(
DEBUG1,
"%d invalid tours found while selecting %d pool entries",
203 mid = pool->
size / 2;
#define palloc_object(type)
#define palloc_array(type, count)
void geqo_copy(PlannerInfo *root, Chromosome *chromo1, Chromosome *chromo2, int string_length)
Cost geqo_eval(PlannerInfo *root, Gene *tour, int num_gene)
Pool * alloc_pool(PlannerInfo *root, int pool_size, int string_length)
void sort_pool(PlannerInfo *root, Pool *pool)
void free_chromo(PlannerInfo *root, Chromosome *chromo)
void free_pool(PlannerInfo *root, Pool *pool)
void random_init_pool(PlannerInfo *root, Pool *pool)
void spread_chromo(PlannerInfo *root, Chromosome *chromo, Pool *pool)
Chromosome * alloc_chromo(PlannerInfo *root, int string_length)
static int compare(const void *arg1, const void *arg2)
void init_tour(PlannerInfo *root, Gene *tour, int num_gene)
void pfree(void *pointer)
#define qsort(a, b, c, d)