[Quantproject-developers] QuantProject/b1_ADT/Optimizing/Genetic GeneticOptimizer.cs,1.4,1.5
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-07-13 16:36:15
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22902/b1_ADT/Optimizing/Genetic Modified Files: GeneticOptimizer.cs Log Message: - The NewGeneration event has been added. - The [Serializable] attribute has been added. Index: GeneticOptimizer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic/GeneticOptimizer.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GeneticOptimizer.cs 2 Jun 2005 18:03:59 -0000 1.4 --- GeneticOptimizer.cs 13 Jul 2005 16:36:03 -0000 1.5 *************** *** 27,31 **** namespace QuantProject.ADT.Optimizing.Genetic { ! /// <summary> /// The class needs to be initialized by an object implementing /// IGenomeManager interface --- 27,34 ---- namespace QuantProject.ADT.Optimizing.Genetic { ! public delegate void NewGenerationEventHandler( ! Object sender , NewGenerationEventArgs eventArgs ); ! ! /// <summary> /// The class needs to be initialized by an object implementing /// IGenomeManager interface *************** *** 34,37 **** --- 37,41 ---- /// keepOnRunningUntilConvergenceIsReached = false, minConvergenceRate = 0.80 /// </summary> + [Serializable] public class GeneticOptimizer { *************** *** 124,127 **** --- 128,133 ---- } #endregion + + public event NewGenerationEventHandler NewGeneration; /// <summary> *************** *** 228,231 **** --- 234,238 ---- this.createGenomes(); this.currentGeneration.Sort(this.genomeComparer); + this.NewGeneration( this , new NewGenerationEventArgs( this.currentGeneration ) ); this.calculateTotalFitness(); this.updateCumulativeFitnessList(); *************** *** 378,382 **** this.nextGeneration.Sort(this.genomeComparer); this.updateCurrentGeneration(); ! this.currentGeneration.Sort(this.genomeComparer); this.calculateTotalFitness(); this.updateCumulativeFitnessList(); --- 385,390 ---- this.nextGeneration.Sort(this.genomeComparer); this.updateCurrentGeneration(); ! this.currentGeneration.Sort(this.genomeComparer); ! this.NewGeneration( this , new NewGenerationEventArgs( this.currentGeneration ) ); this.calculateTotalFitness(); this.updateCumulativeFitnessList(); |