[Quantproject-developers] QuantProject/b1_ADT/Optimizing/Genetic GenomeManagement.cs, 1.8, 1.9
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2006-08-02 17:19:37
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv10406/b1_ADT/Optimizing/Genetic Modified Files: GenomeManagement.cs Log Message: Fixed bug in setMaskForChildsForAlternateFixedCrossover method. Index: GenomeManagement.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic/GenomeManagement.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GenomeManagement.cs 2 Jul 2006 19:51:36 -0000 1.8 --- GenomeManagement.cs 2 Aug 2006 17:19:30 -0000 1.9 *************** *** 142,155 **** private static void setMaskForChildsForAlternateFixedCrossover() { ! for(int childIndex = 0; childIndex < 2; childIndex++) { ! for(int genePos = 0; genePos < genomeSize; genePos++) { ! if(genePos%2 == 0) ! //gene position is even ! maskForChilds[childIndex, genePos] = 1; ! else ! // gene position is odd ! maskForChilds[childIndex, genePos] = 2; } } --- 142,158 ---- private static void setMaskForChildsForAlternateFixedCrossover() { ! for(int genePos = 0; genePos < genomeSize; genePos++) { ! if(genePos%2 == 0) ! //gene position is even ! { ! maskForChilds[0, genePos] = 1; ! maskForChilds[1, genePos] = 2; ! } ! else ! // gene position is odd { ! maskForChilds[0, genePos] = 2; ! maskForChilds[1, genePos] = 1; } } |