Changeset 10822
- Timestamp:
- 05/07/14 17:15:34 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeManipulatorOperator.cs
r10801 r10822 50 50 if (GenealogyGraph.Contains(ChildParameter.ActualValue)) { 51 51 // if the graph already contains a vertex representing the child, it means that the child is a product of crossover 52 // when mutation follows after crossover, some changes need to be made 52 // when mutation follows after crossover, some changes need to be made to the graph to maintain consistency 53 53 var child = ChildParameter.ActualValue; 54 54 var clone = (T)child.Clone(); … … 58 58 // adjust parent-child(clone) relationship in the graph 59 59 var parents = vChild.Parents; 60 // if there's a fragment, save it61 vChild.InArcs = new List<IGenealogyGraphArc>();62 60 foreach (var p in parents) { 63 61 foreach (var a in p.OutArcs.Where(a => a.Target == vChild)) { … … 66 64 vClone.AddReverseArc(p); 67 65 } 66 vClone.InArcs.Last().Data = vChild.InArcs.Last().Data; 67 vChild.InArcs = new List<IGenealogyGraphArc>(); 68 68 vChild.AddReverseArc(vClone); 69 69 vClone.AddForwardArc(vChild); 70 vClone.InArcs.Last().Data = vChild.InArcs.Last().Data;71 72 70 } else { // this needs to be checked 73 71 var vChild = new GenealogyGraphNode<T> { Content = ChildParameter.ActualValue, Rank = Generations.Value }; -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r10462 r10822 28 28 using HeuristicLab.Data; 29 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 30 using HeuristicLab.EvolutionTracking;31 30 using HeuristicLab.Optimization; 32 31 using HeuristicLab.Parameters; … … 358 357 op.BeforeCrossoverOperator = new SymbolicDataAnalysisExpressionBeforeCrossoverOperator(); 359 358 op.AfterCrossoverOperator = new SymbolicDataAnalysisExpressionAfterCrossoverOperator(); 360 op.BeforeManipulatorOperator = new BeforeManipulatorOperator<ISymbolicExpressionTree>();361 op.AfterManipulatorOperator = new AfterManipulatorOperator<ISymbolicExpressionTree>();359 op.BeforeManipulatorOperator = new SymbolicDataAnalysisExpressionBeforeManipulatorOperator(); 360 op.AfterManipulatorOperator = new SymbolicDataAnalysisExpressionAfterManipulatorOperator(); 362 361 // get crossover parameter names 363 362 var crossover = operators.OfType<ISymbolicExpressionTreeCrossover>().FirstOrDefault(); -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionAfterManipulatorOperator.cs
r10755 r10822 30 30 fragment = new Fragment<ISymbolicExpressionTreeNode> { 31 31 Root = a, 32 Index1 = i 32 Index1 = i, 33 Index2 = i 33 34 }; 35 break; 34 36 } 37 38 // if (fragment == null) { 39 // throw new Exception("SymbolicDataAnalysisExpressionAfterManipulatorOperator: Could not identify fragment"); 40 // } 35 41 36 42 vChild.InArcs.First().Data = fragment;
Note: See TracChangeset
for help on using the changeset viewer.