コード例 #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;
         }
     }
 } 
コード例 #2
0
ファイル: GAContext.cs プロジェクト: nagyistoce/Neuroflow
 void PopulationBestBodyArrived(object sender, BestBodyArrivedToGroupEventArgs e)
 {
     OnBestBodyArrived(new BestBodyArrivedToPopulationEventArgs((IPopulation)sender, e.Group, e.Body));
 }