@@ -69,8 +69,8 @@ impl Extension for MultiPointExtension {
6969
7070 // After mutation: Default Noop
7171
72- // After fitness : Remove duplicates if too many
73- fn after_fitness_complete < R : Rng , SR : StrategyReporter < Genotype = Self :: Genotype > > (
72+ // After generation : Remove duplicates if too many
73+ fn after_generation_complete < R : Rng , SR : StrategyReporter < Genotype = Self :: Genotype > > (
7474 & mut self ,
7575 genotype : & mut Self :: Genotype ,
7676 state : & mut EvolveState < Self :: Genotype > ,
@@ -85,7 +85,7 @@ impl Extension for MultiPointExtension {
8585
8686 if duplicate_ratio > 0.5 {
8787 println ! (
88- "After fitness : High duplication ratio ({:.2}%), removing duplicates" ,
88+ "After generation : High duplication ratio ({:.2}%), removing duplicates" ,
8989 duplicate_ratio * 100.0
9090 ) ;
9191
@@ -103,25 +103,6 @@ impl Extension for MultiPointExtension {
103103 }
104104 }
105105 }
106-
107- // After generation: Summary statistics
108- fn after_generation_complete < R : Rng , SR : StrategyReporter < Genotype = Self :: Genotype > > (
109- & mut self ,
110- _genotype : & mut Self :: Genotype ,
111- state : & mut EvolveState < Self :: Genotype > ,
112- _config : & EvolveConfig ,
113- _reporter : & mut SR ,
114- _rng : & mut R ,
115- ) {
116- if state. current_generation ( ) % 100 == 0 {
117- println ! (
118- "Generation {}: Best fitness: {:?}, Cardinality: {:?}" ,
119- state. current_generation( ) ,
120- state. best_fitness_score( ) ,
121- state. population_cardinality( )
122- ) ;
123- }
124- }
125106}
126107
127108fn main ( ) {
0 commit comments