Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/03/08 07:14:04 (16 years ago)
Author:
gkronber
Message:

worked on clone refactoring in HL.GP.

#285 (Cloning could be improved by creating objects at the bottom of the cloning chain with 'new' instead of the top with Activator.CreateInstance())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactorBranch/HeuristicLab.GP.StructureIdentification/Constant.cs

    r656 r890  
    5757    }
    5858
     59    public Constant(Constant original) : this(original, new Dictionary<Guid, object>()) { }
     60    private Constant(Constant original, IDictionary<Guid, object> clonedObjects)
     61      : base(original, clonedObjects) { }
     62
    5963    private void SetupInitialization() {
    6064      // initialization operator
     
    9094      AddVariable(new HeuristicLab.Core.Variable(MANIPULATION, combinedOp));
    9195    }
     96
     97    public override object Clone(IDictionary<Guid, object> clonedObjects) {
     98      return new Constant(this, clonedObjects);
     99    }
    92100  }
    93101}
Note: See TracChangeset for help on using the changeset viewer.