Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/12 17:17:14 (12 years ago)
Author:
bburlacu
Message:

#1772: Changelog:

  • Removed GetCutIndex method, and corresponding index field in the GenealogyGraphNode.
  • Implemented tracking for mutated fragments.
  • Improved FindMatch method.
  • Added IterateNodesBreadth functionality to symbolic expression trees and nodes.
  • Added check conditions for clearing global tracking structures so that the 2 analyzers are not mutually exclusive anymore.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs

    r7785 r7792  
    114114              style = DashStyle.Dash;
    115115            } else {
    116               style = arc.OperatorType == 0 ? DashStyle.Solid : DashStyle.Dash;
     116              style = node.InEdges.Count == 2 ? DashStyle.Solid : DashStyle.Dash;
    117117            }
    118118            var arcPen = new Pen(Color.Transparent) { DashStyle = style };
     
    183183                var end = new Point((int)arc.End.X, (int)arc.End.Y);
    184184                arc.Pen.Brush = new LinearGradientBrush(start, end, arc.Source.ToColor(), arc.Target.ToColor());
    185                 if (node.Data.CutpointIndex == -1) {
    186                   // if the cut index wasn't computed yet
    187                   var parent = arc.Source.Data.Data as ISymbolicExpressionTree;
    188                   var child = node.Data.Data as ISymbolicExpressionTree;
    189                   node.Data.CutpointIndex = GetCutIndex(parent, child);
    190                 }
    191185              }
    192186            }
     
    236230      Chart.EnforceUpdate();
    237231    }
    238 
    239     // maybe this method does't belong here
    240     // TODO: find a good location for this kind of functionality
    241     private static int GetCutIndex(ISymbolicExpressionTree parent, ISymbolicExpressionTree child) {
    242       var e1 = parent.IterateNodesPostfix().GetEnumerator();
    243       var e2 = child.IterateNodesPostfix().GetEnumerator();
    244       int pos = 0;
    245       var comparer = new SymbolicExpressionTreeNodeComparer((int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact);
    246       while (e1.MoveNext() && e2.MoveNext() && comparer.Equals(e1.Current, e2.Current)) ++pos;
    247       if (pos == 0) return -1;
    248       if (pos == child.Length) return 0;
    249       return pos;
    250       //return pos == 0 ? -1 : pos;
    251     }
    252232  }
    253233}
Note: See TracChangeset for help on using the changeset viewer.