Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/31/11 11:52:11 (13 years ago)
Author:
abeham
Message:

#1628

  • Updated branch from trunk
  • Changed ReferenceEqualityComparer<T> to become a non-generic class (generic implementation probably was only made because of lacking support for co- and contravariance in C# 3.5)
  • Added finished experiment from sample algorithms to the tests
  • Wrote a unit test to instantiate every IDeepCloneable type, clone it and compare the objects in the object graph for equal references
  • Wrote a unit test to load the experiment, clone it and compare again the objects in the object graph
  • Preliminary fix for a potential bug in ThreadSafeLog
  • Preliminary fix for a potential bug in OperatorGraphVisualizationInfo
  • Preliminary fix for a potential bug in Calculator (and added license headers)
  • Preliminary fix for a potential bug in ScrambleMove
Location:
branches/GeneralizedQAP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP

  • branches/GeneralizedQAP/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs

    r6375 r6685  
    5555      : base() {
    5656      symbol = original.symbol; // symbols are reused
    57       subtrees = new List<ISymbolicExpressionTreeNode>(original.subtrees.Count);
    58       foreach (var subtree in original.subtrees) {
    59         var clonedSubtree = cloner.Clone(subtree);
    60         subtrees.Add(clonedSubtree);
    61         clonedSubtree.Parent = this;
     57      if (original.subtrees != null) {
     58        subtrees = new List<ISymbolicExpressionTreeNode>(original.subtrees.Count);
     59        foreach (var subtree in original.subtrees) {
     60          var clonedSubtree = cloner.Clone(subtree);
     61          subtrees.Add(clonedSubtree);
     62          clonedSubtree.Parent = this;
     63        }
    6264      }
    6365    }
  • branches/GeneralizedQAP/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeTerminalNode.cs

    r6233 r6685  
    3737    [StorableConstructor]
    3838    protected SymbolicExpressionTreeTerminalNode(bool deserializing) : base(deserializing) { }
    39     // don't call cloning constructor of base to prevent allocation of sub-trees list in base!
    40     protected SymbolicExpressionTreeTerminalNode(SymbolicExpressionTreeTerminalNode original, Cloner cloner)
    41       : base() {
    42       // symbols are reused
    43       this.Symbol = original.Symbol;
    44     }
     39    protected SymbolicExpressionTreeTerminalNode(SymbolicExpressionTreeTerminalNode original, Cloner cloner) : base(original, cloner) { }
    4540    protected SymbolicExpressionTreeTerminalNode() : base() { }
    4641
Note: See TracChangeset for help on using the changeset viewer.