Changeset 10936 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers
- Timestamp:
- 06/04/14 12:56:05 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs
r10897 r10936 137 137 get { return GenerationsParameter.ActualValue; } 138 138 } 139 139 140 public IGenealogyGraph<T> GenealogyGraph { 140 141 get { … … 281 282 282 283 prevVertex.Content = clone; 283 284 // inject the graph node unique id to the scope 284 285 ExecutionContext.Scope.SubScopes[index].Variables["Id"].Value = new StringValue(vertex.Id); 285 286 … … 299 300 } 300 301 302 // remove extra graph nodes (added by the instrumented operators in the case of offspring selection) 303 var discardedOffspring = GenealogyGraph.Ranks[Generations.Value].Select(x => (T)x.Content).Except(population).ToList(); 304 foreach (var individual in discardedOffspring) { 305 var vertex = GenealogyGraph.GetVertex(individual); 306 GenealogyGraph.RemoveVertex(vertex); 307 } 308 301 309 return base.Apply(); 302 310 }
Note: See TracChangeset
for help on using the changeset viewer.