Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/11/11 15:03:46 (14 years ago)
Author:
gkronber
Message:

Merged changes from trunk to data analysis exploration branch and added fractional distance metric evaluator. #1142

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs

    r4068 r5275  
    3333    #region Properties
    3434    [Storable]
    35     private double weightNu;
    36     public double WeightNu {
    37       get { return weightNu; }
     35    private double weightMu;
     36    public double WeightMu {
     37      get { return weightMu; }
    3838      set {
    39         if (value != weightNu) {
    40           weightNu = value;
     39        if (value != weightMu) {
     40          weightMu = value;
    4141          OnChanged(EventArgs.Empty);
    4242        }
     
    5656    }
    5757    [Storable]
    58     private double weightManipulatorNu;
    59     public double WeightManipulatorNu {
    60       get { return weightManipulatorNu; }
     58    private double weightManipulatorMu;
     59    public double WeightManipulatorMu {
     60      get { return weightManipulatorMu; }
    6161      set {
    62         if (value != weightManipulatorNu) {
    63           weightManipulatorNu = value;
     62        if (value != weightManipulatorMu) {
     63          weightManipulatorMu = value;
    6464          OnChanged(EventArgs.Empty);
    6565        }
     
    9090    }
    9191    #endregion
     92    [StorableConstructor]
     93    protected Variable(bool deserializing) : base(deserializing) {
     94      variableNames = new List<string>();
     95    }
     96    protected Variable(Variable original, Cloner cloner)
     97      : base(original, cloner) {
     98      weightMu = original.weightMu;
     99      weightSigma = original.weightSigma;
     100      variableNames = new List<string>(original.variableNames);
     101      weightManipulatorMu = original.weightManipulatorMu;
     102      weightManipulatorSigma = original.weightManipulatorSigma;
     103    }
    92104    public Variable() : this("Variable", "Represents a variable value.") { }
    93105    public Variable(string name, string description)
    94106      : base(name, description) {
    95       weightNu = 1.0;
     107      weightMu = 1.0;
    96108      weightSigma = 1.0;
    97       weightManipulatorNu = 0.0;
     109      weightManipulatorMu = 0.0;
    98110      weightManipulatorSigma = 1.0;
    99111      variableNames = new List<string>();
     
    105117
    106118    public override IDeepCloneable Clone(Cloner cloner) {
    107       Variable clone = (Variable)base.Clone(cloner);
    108       clone.weightNu = weightNu;
    109       clone.weightSigma = weightSigma;
    110       clone.variableNames = new List<string>(variableNames);
    111       clone.weightManipulatorNu = weightManipulatorNu;
    112       clone.weightManipulatorSigma = weightManipulatorSigma;
    113       return clone;
     119      return new Variable(this, cloner);
    114120    }
    115121  }
Note: See TracChangeset for help on using the changeset viewer.