- Timestamp:
- 05/11/14 00:03:36 (10 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs
r10830 r10833 205 205 if (EnableCrossoverTracking.Value) { 206 206 if (BeforeCrossoverOperator != null) { 207 // BeforeCrossoverOperator.ParentsParameter.ActualName = CrossoverParentsParameterName;208 // BeforeCrossoverOperator.ChildParameter.ActualName = CrossoverChildParameterName;209 207 instrumentedCrossover.BeforeExecutionOperators.Add(BeforeCrossoverOperator); 210 208 } 211 209 if (AfterCrossoverOperator != null) { 212 // AfterCrossoverOperator.ParentsParameter.ActualName = CrossoverParentsParameterName;213 // AfterCrossoverOperator.ChildParameter.ActualName = CrossoverChildParameterName;214 210 instrumentedCrossover.AfterExecutionOperators.Add(AfterCrossoverOperator); 215 211 } … … 224 220 if (EnableManipulatorTracking.Value) { 225 221 if (BeforeManipulatorOperator != null) { 226 // BeforeManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName;227 222 instrumentedManipulator.BeforeExecutionOperators.Add(BeforeManipulatorOperator); 228 223 } 229 224 if (AfterManipulatorOperator != null) { 230 // AfterManipulatorOperator.ChildParameter.ActualName = ManipulatorChildParameterName;231 225 instrumentedManipulator.AfterExecutionOperators.Add(AfterManipulatorOperator); 232 226 } … … 257 251 IsElite = true 258 252 }; 253 // add new vertex to the graph 254 GenealogyGraph.AddVertex(vertex); 255 // swap content between current vertex and previous vertex 259 256 var previousVertex = (IGenealogyGraphNode<T>)GenealogyGraph[elite]; 260 GenealogyGraph.AddVertex(vertex); 257 var tmp = vertex.Content; 258 vertex.Content = previousVertex.Content; 259 previousVertex.Content = tmp; 260 // adjust graph content map 261 GenealogyGraph[vertex.Content] = vertex; 262 GenealogyGraph[previousVertex.Content] = previousVertex; 263 // connect current elite with previous elite 261 264 previousVertex.AddForwardArc(vertex); 262 265 vertex.AddReverseArc(previousVertex); -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/DirectedGraph/DirectedGraph.cs
r10755 r10833 68 68 return result; 69 69 } 70 set { 71 contentMap[key] = value; 72 } 70 73 } 71 74 public virtual bool Any(Func<IVertex, bool> predicate) { -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/DirectedGraph/Interfaces/IDirectedGraph.cs
r10755 r10833 32 32 void RemoveVertex(IVertex vertex); 33 33 List<IVertex> Nodes { get; } 34 IVertex this[object content] { get; }34 IVertex this[object content] { get; set; } 35 35 bool Contains(object content); 36 36 } -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraph.cs
r10830 r10833 76 76 return result == null ? null : (IGenealogyGraphNode)result; 77 77 } 78 set { base[content] = value; } 78 79 } 79 80
Note: See TracChangeset
for help on using the changeset viewer.