Ejemplo n.º 1
0
 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;
         }
     }
 } 
Ejemplo n.º 2
0
 void PopulationBestBodyArrived(object sender, BestBodyArrivedToGroupEventArgs e)
 {
     OnBestBodyArrived(new BestBodyArrivedToPopulationEventArgs((IPopulation)sender, e.Group, e.Body));
 }