Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (14 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.ExternalEvaluation.GP/3.3/Symbols/Constant.cs

    r4089 r4722  
    7878    }
    7979    #endregion
     80
     81    [StorableConstructor]
     82    private Constant(bool deserializing) : base(deserializing) { }
     83    private Constant(Constant original, Cloner cloner)
     84      : base(original, cloner) {
     85      minValue = original.minValue;
     86      maxValue = original.maxValue;
     87      manipulatorNu = original.manipulatorNu;
     88      manipulatorSigma = original.manipulatorSigma;
     89    }
     90    public override IDeepCloneable Clone(Cloner cloner) {
     91      return new Constant(this, cloner);
     92    }
    8093    public Constant()
    8194      : base("Constant", "Represents a constant value.") {
     
    89102      return new ConstantTreeNode(this);
    90103    }
    91 
    92     public override IDeepCloneable Clone(Cloner cloner) {
    93       Constant clone = (Constant)base.Clone(cloner);
    94       clone.minValue = minValue;
    95       clone.maxValue = maxValue;
    96       clone.manipulatorNu = manipulatorNu;
    97       clone.manipulatorSigma = manipulatorSigma;
    98       return clone;
    99     }
    100104  }
    101105}
Note: See TracChangeset for help on using the changeset viewer.