void OnBestBodyArrived(object sender, BestBodyArrivedToGroupEventArgs<DNASequence<double>, AdjustedNetworkBody<NeuralNetwork>> e)
 {
     lock (SyncRoot)
     {
         var body = e.Body as AdjustedNeuralNetworkBody;
         Debug.Assert(body != null);
         if (bestBody == null || body.Error < bestBody.Error)
         {
             bestBody = body;
         }
     }
 } 
Exemple #2
0
 void PopulationBestBodyArrived(object sender, BestBodyArrivedToGroupEventArgs e)
 {
     OnBestBodyArrived(new BestBodyArrivedToPopulationEventArgs((IPopulation)sender, e.Group, e.Body));
 }