[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag WFLagGenomeMan
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2007-01-03 23:20:44
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4394/b7_Scripts/WalkForwardTesting/WalkForwardLag Modified Files: WFLagGenomeManagerWithWeights.cs WFLagGenomeManager.cs Log Message: Deleted the mutationRate parameter from the IGenomeManager's Mutate method. Now classes implementing Mutate method just need to pass only the genome that has to be mutated to the method. As the mutationRate is now used only by the GeneticOptimizer, all the methods that effectively mutate genes of a given genome don't need anymore the mutation rate parameter. Index: WFLagGenomeManagerWithWeights.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagGenomeManagerWithWeights.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WFLagGenomeManagerWithWeights.cs 21 Aug 2006 21:17:32 -0000 1.3 --- WFLagGenomeManagerWithWeights.cs 3 Jan 2007 23:20:09 -0000 1.4 *************** *** 266,270 **** GenomeManagement.AlternateFixedCrossover(parent1, parent2); } ! public void Mutate( Genome genome , double mutationRate ) { // int newValueForGene = GenomeManagement.RandomGenerator.Next( --- 266,270 ---- GenomeManagement.AlternateFixedCrossover(parent1, parent2); } ! public void Mutate( Genome genome ) { // int newValueForGene = GenomeManagement.RandomGenerator.Next( *************** *** 275,279 **** int newValueForGene = this.GetNewGeneValue( genome , genePositionToBeMutated ); ! GenomeManagement.MutateOneGene( genome , mutationRate , genePositionToBeMutated , newValueForGene ); } --- 275,279 ---- int newValueForGene = this.GetNewGeneValue( genome , genePositionToBeMutated ); ! GenomeManagement.MutateOneGene( genome , genePositionToBeMutated , newValueForGene ); } Index: WFLagGenomeManager.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagGenomeManager.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** WFLagGenomeManager.cs 3 Nov 2006 16:35:13 -0000 1.7 --- WFLagGenomeManager.cs 3 Jan 2007 23:20:09 -0000 1.8 *************** *** 273,277 **** GenomeManagement.AlternateFixedCrossover(parent1, parent2); } ! public void Mutate( Genome genome , double mutationRate ) { // int newValueForGene = GenomeManagement.RandomGenerator.Next( --- 273,277 ---- GenomeManagement.AlternateFixedCrossover(parent1, parent2); } ! public void Mutate( Genome genome ) { // int newValueForGene = GenomeManagement.RandomGenerator.Next( *************** *** 282,286 **** int newValueForGene = this.GetNewGeneValue( genome , genePositionToBeMutated ); ! GenomeManagement.MutateOneGene( genome , mutationRate , genePositionToBeMutated , newValueForGene ); } --- 282,286 ---- int newValueForGene = this.GetNewGeneValue( genome , genePositionToBeMutated ); ! GenomeManagement.MutateOneGene( genome , genePositionToBeMutated , newValueForGene ); } |