private void Accept(EvolutionDurations durations) { var selection = ToSeconds(durations.GetOffspringSelectionDuration()) + ToSeconds(durations.GetSurvivorsSelectionDuration()); var alter = ToSeconds(durations.GetOffspringAlterDuration()) + ToSeconds(durations.GetOffspringFilterDuration()); SelectionDuration.Accept(selection); AlterDuration.Accept(alter); EvaluationDuration .Accept(ToSeconds(durations.GetEvaluationDuration())); EvolveDuration .Accept(ToSeconds(durations.GetEvolveDuration())); }
public static EvolutionResult <TGene, TAllele> Of <TGene, TAllele>( Optimize optimize, Population <TGene, TAllele> population, long generation, EvolutionDurations durations, int killCount, int invalidCount, int alterCount ) where TGene : IGene <TGene> where TAllele : IComparable <TAllele>, IConvertible { return(new EvolutionResult <TGene, TAllele>( optimize, population, generation, generation, durations, killCount, invalidCount, alterCount )); }