PostgreSQL Source Code git master
Loading...
Searching...
No Matches
geqo_copy.c
Go to the documentation of this file.
1/*------------------------------------------------------------------------
2 *
3 * geqo_copy.c
4 *
5 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
6 * Portions Copyright (c) 1994, Regents of the University of California
7 *
8 * src/backend/optimizer/geqo/geqo_copy.c
9 *
10 *-------------------------------------------------------------------------
11 */
12
13/*
14 * contributed by:
15 * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
16 * * Martin Utesch * Institute of Automatic Control *
17 * = = University of Mining and Technology =
18 * * utesch@aut.tu-freiberg.de * Freiberg, Germany *
19 * =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
20 */
21
22/* this is adopted from D. Whitley's Genitor algorithm */
23
24/*************************************************************/
25/* */
26/* Copyright (c) 1990 */
27/* Darrell L. Whitley */
28/* Computer Science Department */
29/* Colorado State University */
30/* */
31/* Permission is hereby granted to copy all or any part of */
32/* this program for free distribution. The author's name */
33/* and this copyright notice must be included in any copy. */
34/* */
35/*************************************************************/
36
37#include "postgres.h"
38#include "optimizer/geqo_copy.h"
39
40/*
41 * geqo_copy
42 *
43 * copies one gene to another
44 *
45 */
46void
48 int string_length)
49{
50 int i;
51
52 for (i = 0; i < string_length; i++)
53 chromo1->string[i] = chromo2->string[i];
54
55 chromo1->worth = chromo2->worth;
56}
void geqo_copy(PlannerInfo *root, Chromosome *chromo1, Chromosome *chromo2, int string_length)
Definition geqo_copy.c:47
int i
Definition isn.c:77
static int fb(int x)
tree ctl root
Definition radixtree.h:1857