Changeset 10675
- Timestamp:
- 03/27/14 02:18:08 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs
r10674 r10675 226 226 IsElite = true 227 227 }; 228 var previousVertex = GenealogyGraph[elite].Last();228 var previousVertex = (IGenealogyGraphNode<T>)GenealogyGraph[elite].Last(); 229 229 GenealogyGraph.AddVertex(vertex); 230 230 previousVertex.AddForwardArc(vertex); 231 231 vertex.AddReverseArc(previousVertex); 232 vertex.InArcs.Last().Data = previousVertex.InArcs.Last().Data; // save the fragment in case there is one 233 vertex.Id = previousVertex.Id; 232 234 } 233 235 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeCrossoverOperator.cs
r10674 r10675 63 63 public override IOperation Apply() { 64 64 if (CurrentGeneration == null) throw new Exception(); 65 // we get the parents by parsing the scope name because the individuals in the execution scope are clones of the ones saved in the graph66 // var parentVertices = ExecutionContext.Scope.SubScopes.Select(s => CurrentGeneration.Find(x => x.Id == ((StringValue)s.Variables["Id"].Value)).ToList();67 65 var parentVertices = (from s in ExecutionContext.Scope.SubScopes 68 66 let id = ((StringValue)s.Variables["Id"].Value).Value
Note: See TracChangeset
for help on using the changeset viewer.