#
# Copyright (c) 1994, Regents of the University of California
#
-# $Id: Makefile,v 1.1 1997/02/19 12:56:38 scrappy Exp $
+# $Id: Makefile,v 1.2 1997/02/19 14:51:55 scrappy Exp $
#
#-------------------------------------------------------------------------
-I../../port/$(PORTNAME) \
-I../../../include
-CFLAGS+=$(INCLUDE_OPT)
+CFLAGS+=$(INCLUDE_OPT) -Wno-error
-OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
- geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \
- geqo_selection.o \
- geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o
+OBJS = geqo_copy.o geqo_eval.o geqo_main.o geqo_misc.o \
+ geqo_params.o geqo_paths.o geqo_pool.o geqo_recombination.o \
+ geqo_selection.o \
+ geqo_erx.o geqo_pmx.o geqo_cx.o geqo_px.o
# not ready yet: geqo_ox1.o geqo_ox2.o
# deprecated: minspantree.o
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.3 1997/02/19 14:29:22 scrappy Exp $
+ * $Id: geqo_eval.c,v 1.4 1997/02/19 14:51:57 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include "optimizer/pathnode.h"
#include "optimizer/clauses.h"
#include "optimizer/cost.h"
+#include "optimizer/tlist.h"
+#include "optimizer/joininfo.h"
#include "optimizer/geqo_gene.h"
#include "optimizer/geqo.h"
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_main.c,v 1.1 1997/02/19 12:57:05 scrappy Exp $
+ * $Id: geqo_main.c,v 1.2 1997/02/19 14:51:59 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
Rel *
geqo(Query *root)
{
- int i,j;
int generation;
Chromosome *momma;
Chromosome *daddy;
int edge_failures=0;
float difference;
+#if defined(CX) || defined(PX) || defined(QX1) || defined(QX2)
City *city_table; /* list of cities */
+#endif
+
+#if defined(CX)
int cycle_diffs=0;
+#endif
+#if defined(CX) && defined(GEQO_DEBUG)
int mutations=0;
+#endif
int number_of_rels;
- List *r = NIL;
- List *rel_list = (List *) root->base_relation_list_;
Pool *pool;
int pool_size, number_generations, status_interval;
Gene *best_tour;
Rel *best_rel;
- Plan *best_plan;
+/* Plan *best_plan; */
/* set tour size */
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_misc.c,v 1.1 1997/02/19 12:57:09 scrappy Exp $
+ * $Id: geqo_misc.c,v 1.2 1997/02/19 14:52:01 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
{
char *ptype = NULL;
JoinPath *jp;
- bool join;
+ bool join = false;
int i;
for(i=0; i < indent; i++)
*
* Copyright (c) 1994, Regents of the University of California
*
-* $Id: geqo_params.c,v 1.1 1997/02/19 12:57:20 scrappy Exp $
+* $Id: geqo_params.c,v 1.2 1997/02/19 14:52:04 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#include <stdio.h>
#include <time.h>
#include <math.h>
+#include <ctype.h>
#include "postgres.h"
#include "miscadmin.h"
if (i != EOF)
{
- if (sscanf (buf, "%f", &SelectionBias) == 1) selection_bias = 1;
+ if (sscanf (buf, "%lf", &SelectionBias) == 1) selection_bias = 1;
}
}
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_paths.c,v 1.1 1997/02/19 12:57:25 scrappy Exp $
+ * $Id: geqo_paths.c,v 1.2 1997/02/19 14:52:06 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
geqo_rel_paths(Rel *rel)
{
List *y = NIL;
- Path *path;
+ Path *path = (Path*)NULL;
JoinPath *cheapest = (JoinPath*)NULL;
foreach(y, rel->pathlist) {