Changeset 11503 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking
- Timestamp:
- 10/26/14 22:20:26 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/TraceCalculator.cs
r11493 r11503 187 187 private void ConnectLast(IGenealogyGraphNode<ISymbolicExpressionTree> g, int si, IGenealogyGraphNode<ISymbolicExpressionTree> last) { 188 188 IFragment<ISymbolicExpressionTreeNode> fragment = g.Parents.Any() ? (IFragment<ISymbolicExpressionTreeNode>)g.InArcs.Last().Data : null; 189 var n = traceGraph.GetByContent(g.Data);190 if (n == null) {191 n = g.Copy();192 traceGraph.AddVertex(n);193 }194 189 int fi = fragment == null ? 0 : fragment.Index1; // fragment index 195 traceMap[n] = new Tuple<int, int>(si, fi);190 var n = GetTraceNode(g, si, fi); // will append n to the trace graph if it does not exist 196 191 if (last == null) 197 192 return; … … 201 196 var td = new Tuple<int, int, int, int>(si, fi, lastSi, lastFi); // trace data 202 197 var arc = n.InArcs.SingleOrDefault(a => a.Source == last && a.Data.Equals(td)); 203 if (arc != null)204 return;205 arc = new GenealogyGraphArc(last, n) { Data = td };206 traceGraph.AddArc(arc);198 if (arc == null) { 199 arc = new GenealogyGraphArc(last, n) { Data = td }; 200 traceGraph.AddArc(arc); 201 } 207 202 } 208 203 }
Note: See TracChangeset
for help on using the changeset viewer.