Skip to content
Snippets Groups Projects
Select Git revision
  • 059e361481641b044fb6265b773d77231496eda5
  • master default
  • benchmark-tools
  • postgres-lambda
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
24 results

geqo_copy.c

Blame
  • geqo_copy.c 1.60 KiB
    /*------------------------------------------------------------------------
     *
     * geqo_copy.c
     *
     * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
     * Portions Copyright (c) 1994, Regents of the University of California
     *
     * $Id: geqo_copy.c,v 1.10 2001/01/24 19:42:57 momjian Exp $
     *
     *-------------------------------------------------------------------------
     */
    
    /* contributed by:
       =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
       *  Martin Utesch				 * Institute of Automatic Control	   *
       =							 = University of Mining and Technology =
       *  utesch@aut.tu-freiberg.de  * Freiberg, Germany				   *
       =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
     */
    
    /* this is adopted from D. Whitley's Genitor algorithm */
    
    /*************************************************************/
    /*															 */
    /*	Copyright (c) 1990										 */
    /*	Darrell L. Whitley										 */
    /*	Computer Science Department								 */
    /*	Colorado State University								 */
    /*															 */
    /*	Permission is hereby granted to copy all or any part of  */
    /*	this program for free distribution.   The author's name  */
    /*	and this copyright notice must be included in any copy.  */
    /*															 */
    /*************************************************************/
    
    #include "postgres.h"
    #include "optimizer/geqo_copy.h"
    
    /* geqo_copy
     *
     *	 copies one gene to another
     *
     */
    void
    geqo_copy(Chromosome *chromo1, Chromosome *chromo2, int string_length)
    {
    	int			i;
    
    	for (i = 0; i < string_length; i++)
    		chromo1->string[i] = chromo2->string[i];
    
    	chromo1->worth = chromo2->worth;
    }