1 /*------------------------------------------------------------------------
5 * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
6 * Portions Copyright (c) 1994, Regents of the University of California
8 * src/backend/optimizer/geqo/geqo_copy.c
10 *-------------------------------------------------------------------------
14 =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
15 * Martin Utesch * Institute of Automatic Control *
16 = = University of Mining and Technology =
17 * utesch@aut.tu-freiberg.de * Freiberg, Germany *
18 =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
21 /* this is adopted from D. Whitley's Genitor algorithm */
23 /*************************************************************/
25 /* Copyright (c) 1990 */
26 /* Darrell L. Whitley */
27 /* Computer Science Department */
28 /* Colorado State University */
30 /* Permission is hereby granted to copy all or any part of */
31 /* this program for free distribution. The author's name */
32 /* and this copyright notice must be included in any copy. */
34 /*************************************************************/
37 #include "optimizer/geqo_copy.h"
41 * copies one gene to another
45 geqo_copy(PlannerInfo *root, Chromosome *chromo1, Chromosome *chromo2,
50 for (i = 0; i < string_length; i++)
51 chromo1->string[i] = chromo2->string[i];
53 chromo1->worth = chromo2->worth;