Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/05/15 19:35:34 (10 years ago)
Author:
bburlacu
Message:

#1772:

  • Removed unused code
  • Adapted genealogy graph according to the trunk changes to the directed graph
  • Adapted trace calculator and before/after operators
  • Introduced a CloneableCollection to help save node lists
Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SymbolicDataAnalysisExpressionBeforeCrossoverOperator.cs

    r11852 r11925  
    4949
    5050      for (int i = 0; i < parents.Count; ++i) {
    51         arcs[i].Data = parents[i].IterateNodesPrefix().ToList();
     51        arcs[i].Data = parents[i].IterateNodesPrefix().ToCloneableCollection();
    5252      }
    5353
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/TraceCalculator.cs

    r11881 r11925  
    9595        Debug.Assert(si < g.Data.Length);
    9696        var inArcs = (List<IArc>)((IVertex)g).InArcs;
    97         var fragment = (IFragment<ISymbolicExpressionTreeNode>)inArcs.Last().Data;
     97        var fragment = (IFragment<ISymbolicExpressionTreeNode>)((IGenealogyGraphArc)inArcs.Last()).Data;
    9898        if (fragment == null) {
    9999          // TODO: think about what the correct behavior should be here (seems good so far)
     
    225225  }
    226226  // this class is here to help clarify the semantics
    227   public class TraceData : Tuple<int, int, int, int> {
     227  public class TraceData : Tuple<int, int, int, int>, IDeepCloneable {
    228228    public TraceData(int currentSubtreeIndex, int currentFragmentIndex, int lastSubtreeIndex, int lastFragmentIndex)
    229229      : base(currentSubtreeIndex, currentFragmentIndex, lastSubtreeIndex, lastFragmentIndex) {
     
    234234    public int LastSubtreeIndex { get { return Item3; } }
    235235    public int LastFragmentIndex { get { return Item4; } }
     236    public object Clone() {
     237      return new TraceData(SubtreeIndex, FragmentIndex, LastSubtreeIndex, LastFragmentIndex);
     238    }
     239
     240    public IDeepCloneable Clone(Cloner cloner) {
     241      return cloner.Clone(this);
     242    }
    236243  }
    237244
Note: See TracChangeset for help on using the changeset viewer.