Coverage Report

Created: 2026-08-13 07:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/postgres/src/backend/optimizer/geqo/geqo_copy.c
Line
Count
Source
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
 */
46
void
47
geqo_copy(PlannerInfo *root, Chromosome *chromo1, Chromosome *chromo2,
48
      int string_length)
49
0
{
50
0
  int     i;
51
52
0
  for (i = 0; i < string_length; i++)
53
0
    chromo1->string[i] = chromo2->string[i];
54
55
0
  chromo1->worth = chromo2->worth;
56
0
}