1997-02-19 13:59:07 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* geqo.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* prototypes for various files in optimizer/geqo
|
1997-02-19 13:59:07 +01:00
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1997-02-19 13:59:07 +01:00
|
|
|
*
|
2000-06-28 05:33:33 +02:00
|
|
|
* $Id: geqo.h,v 1.20 2000/06/28 03:33:22 tgl Exp $
|
1997-02-19 13:59:07 +01:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* contributed by:
|
|
|
|
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
|
1997-09-07 07:04:48 +02:00
|
|
|
* Martin Utesch * Institute of Automatic Control *
|
|
|
|
= = University of Mining and Technology =
|
|
|
|
* utesch@aut.tu-freiberg.de * Freiberg, Germany *
|
1997-02-19 13:59:07 +01:00
|
|
|
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
|
|
|
|
*/
|
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef GEQO_H
|
|
|
|
#define GEQO_H
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1997-11-26 02:14:33 +01:00
|
|
|
#include "nodes/relation.h"
|
|
|
|
#include "optimizer/geqo_gene.h"
|
1997-02-19 13:59:07 +01:00
|
|
|
|
|
|
|
/* GEQO debug flag */
|
|
|
|
/*
|
|
|
|
#define GEQO_DEBUG
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* recombination mechanism */
|
|
|
|
/*
|
|
|
|
#define ERX
|
|
|
|
#define PMX
|
|
|
|
#define CX
|
|
|
|
#define PX
|
|
|
|
#define OX1
|
|
|
|
#define OX2
|
|
|
|
*/
|
|
|
|
#define ERX
|
|
|
|
|
|
|
|
|
2000-05-31 02:28:42 +02:00
|
|
|
/*
|
|
|
|
* Configuration options
|
|
|
|
*/
|
|
|
|
extern int Geqo_pool_size;
|
|
|
|
#define DEFAULT_GEQO_POOL_SIZE 0 /* = default based on no. of relations. */
|
|
|
|
#define MIN_GEQO_POOL_SIZE 128
|
|
|
|
#define MAX_GEQO_POOL_SIZE 1024
|
1997-02-19 13:59:07 +01:00
|
|
|
|
2000-05-31 02:28:42 +02:00
|
|
|
extern int Geqo_effort; /* 1 .. inf, only used to calculate generations default */
|
|
|
|
extern int Geqo_generations; /* 1 .. inf, or 0 to use default based on pool size */
|
1997-02-19 13:59:07 +01:00
|
|
|
|
2000-05-31 02:28:42 +02:00
|
|
|
extern double Geqo_selection_bias;
|
|
|
|
#define DEFAULT_GEQO_SELECTION_BIAS 2.0
|
|
|
|
#define MIN_GEQO_SELECTION_BIAS 1.5
|
|
|
|
#define MAX_GEQO_SELECTION_BIAS 2.0
|
1997-02-19 13:59:07 +01:00
|
|
|
|
2000-05-31 02:28:42 +02:00
|
|
|
extern int Geqo_random_seed; /* or negative to use current time */
|
1997-02-19 13:59:07 +01:00
|
|
|
|
|
|
|
|
1999-05-17 02:25:34 +02:00
|
|
|
/* routines in geqo_main.c */
|
1998-07-18 06:22:52 +02:00
|
|
|
extern RelOptInfo *geqo(Query *root);
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1999-05-17 02:25:34 +02:00
|
|
|
/* routines in geqo_eval.c */
|
1997-09-08 23:56:23 +02:00
|
|
|
extern Cost geqo_eval(Query *root, Gene *tour, int num_gene);
|
1999-02-18 05:55:54 +01:00
|
|
|
extern RelOptInfo *gimme_tree(Query *root, Gene *tour, int rel_count,
|
1999-05-26 00:43:53 +02:00
|
|
|
int num_gene, RelOptInfo *old_rel);
|
1997-02-19 13:59:07 +01:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* GEQO_H */
|