Changeset 11233 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking
- Timestamp:
- 07/30/14 01:41:54 (10 years ago)
- Location:
- branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionAfterCrossoverOperator.cs
r10897 r11233 30 30 public class SymbolicDataAnalysisExpressionAfterCrossoverOperator : AfterCrossoverOperator<ISymbolicExpressionTree> { 31 31 public override IOperation Apply() { 32 var childVertex = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.Get Vertex(ChildParameter.ActualValue);32 var childVertex = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.GetByContent(ChildParameter.ActualValue); 33 33 var arcs = childVertex.InArcs.ToList(); 34 34 var nodes0 = (List<ISymbolicExpressionTreeNode>)arcs[0].Data; -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionAfterManipulatorOperator.cs
r10897 r11233 40 40 41 41 public override IOperation Apply() { 42 var vChild = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.Get Vertex(ChildParameter.ActualValue);42 var vChild = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.GetByContent(ChildParameter.ActualValue); 43 43 var nodesBefore = (List<ISymbolicExpressionTreeNode>)vChild.InArcs.First().Data; 44 44 var nodesAfter = ChildParameter.ActualValue.IterateNodesPrefix().ToList(); -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionBeforeCrossoverOperator.cs
r10897 r11233 30 30 var result = base.Apply(); // the base operator will add the child to the graph before the actual crossover operation takes place 31 31 var parents = ParentsParameter.ActualValue.ToList(); 32 var childVertex = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.Get Vertex(parents[0]); // use the parent since it is actually the child before crossover (and the ChildParameter doesn't have a value yet)32 var childVertex = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.GetByContent(parents[0]); // use the parent since it is actually the child before crossover (and the ChildParameter doesn't have a value yet) 33 33 var arcs = childVertex.InArcs.ToList(); 34 34 -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionBeforeManipulatorOperator.cs
r10897 r11233 30 30 var result = base.Apply(); // add the vertex in the genealogy graph 31 31 32 var vChild = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.Get Vertex(ChildParameter.ActualValue);32 var vChild = (IGenealogyGraphNode<ISymbolicExpressionTree>)GenealogyGraph.GetByContent(ChildParameter.ActualValue); 33 33 var vClone = vChild.Parents.Last(); 34 34 vChild.InArcs.First().Data = vClone.Content.IterateNodesPrefix().ToList(); -
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionTracing.cs
r10888 r11233 30 30 public static class SymbolicDataAnalysisExpressionTracing { 31 31 public static FragmentGraph TraceSubtree(IGenealogyGraphNode<ISymbolicExpressionTree> graphNode, int subtreeIndex) { 32 var graph = new FragmentGraph { AllowDuplicateContent = true };32 var graph = new FragmentGraph(); 33 33 var nodes = Trace(graphNode, subtreeIndex); 34 34 foreach (var n in nodes) { … … 51 51 while (true) { 52 52 if (!node.Parents.Any()) { 53 var fragmentNode = new FragmentNode { 54 Content = node, 53 var fragmentNode = new FragmentNode(node) { 55 54 SubtreeIndex = index, 56 55 }; 57 56 if (parent != null) { 58 57 var arc = new Arc(parent, fragmentNode); 59 parent.AddForwardArc(arc); 60 fragmentNode.AddReverseArc(arc); 58 parent.AddArc(arc); 59 fragmentNode.AddArc(arc); 60 61 // parent.AddForwardArc(arc); 62 // fragmentNode.AddReverseArc(arc); 61 63 } 62 64 yield return fragmentNode; // no tracing if there are no parents … … 79 81 if (parents.Count == 1) { 80 82 // we are tracing a mutation operation 81 var fragmentNode = new FragmentNode { 82 Content = node, 83 var fragmentNode = new FragmentNode(node) { 83 84 SubtreeIndex = index, 84 85 FragmentIndex = fragment.Index1 … … 86 87 if (parent != null) { 87 88 var arc = new Arc(parent, fragmentNode); 88 parent.Add ForwardArc(arc);89 fragmentNode.Add ReverseArc(arc);89 parent.AddArc(arc); 90 fragmentNode.AddArc(arc); 90 91 } 91 92 node = parents[0]; … … 138 139 if (fragment.Index1 < index + subtreeLength) { 139 140 // subtree contains fragment => bifurcation point in the fragment graph 140 var fragmentNode = new FragmentNode { 141 Content = node, 141 var fragmentNode = new FragmentNode(node) { 142 142 SubtreeIndex = index, 143 143 FragmentIndex = fragment.Index1 … … 145 145 if (parent != null) { 146 146 var arc = new Arc(parent, fragmentNode); 147 parent.Add ForwardArc(arc);148 fragmentNode.Add ReverseArc(arc);147 parent.AddArc(arc); 148 fragmentNode.AddArc(arc); 149 149 } 150 150 yield return fragmentNode;
Note: See TracChangeset
for help on using the changeset viewer.