[Quantproject-developers] QuantProject/b1_ADT/Optimizing/Genetic Genome.cs,1.3,1.4
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-06-24 22:23:30
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1528/b1_ADT/Optimizing/Genetic Modified Files: Genome.cs Log Message: Modified HasSomeDuplicateGenes method in Genome class. Introduced the concept that two genes can be duplicates if their difference is equal to a given constant Index: Genome.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic/Genome.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Genome.cs 10 Jun 2005 18:48:44 -0000 1.3 --- Genome.cs 24 Jun 2005 22:23:15 -0000 1.4 *************** *** 168,172 **** /// values in genes /// </summary> ! public bool HasSomeDuplicateGenes() { bool returnValue = false; --- 168,172 ---- /// values in genes /// </summary> ! public bool HasSomeDuplicateGenes(int constToDiscoverDuplicateGenes) { bool returnValue = false; *************** *** 175,180 **** for(int j = i + 1; j < this.size ; j++) { ! if(this.genes[i] == this.genes[j]) ! returnValue = true; } } --- 175,183 ---- for(int j = i + 1; j < this.size ; j++) { ! if(this.genes[i] == this.genes[j] || ! this.genes[i] + constToDiscoverDuplicateGenes == this.genes[j] || ! this.genes[i] == this.genes[j] + constToDiscoverDuplicateGenes) ! ! returnValue = true; } } |