PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
geqo_copy.c File Reference
#include "postgres.h"
#include "optimizer/geqo_copy.h"
Include dependency graph for geqo_copy.c:

Go to the source code of this file.


void geqo_copy (PlannerInfo *root, Chromosome *chromo1, Chromosome *chromo2, int string_length)

Function Documentation

void geqo_copy ( PlannerInfo root,
Chromosome chromo1,
Chromosome chromo2,
int  string_length 

Definition at line 45 of file geqo_copy.c.

References i, Chromosome::string, and Chromosome::worth.

Referenced by geqo_selection(), and spread_chromo().

47 {
48  int i;
50  for (i = 0; i < string_length; i++)
51  chromo1->string[i] = chromo2->string[i];
53  chromo1->worth = chromo2->worth;
54 }
Cost worth
Definition: geqo_gene.h:35
int i
Gene * string
Definition: geqo_gene.h:34