Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/10 08:53:04 (15 years ago)
Author:
gkronber
Message:

Bug fixes in cloning and persistence code. #938

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs

    r3462 r3485  
    3333  public sealed class Constant : Symbol {
    3434    #region Propeties
     35    [Storable]
    3536    private double minValue;
    3637    public double MinValue {
     
    3839      set { minValue = value; }
    3940    }
     41    [Storable]
    4042    private double maxValue;
    4143    public double MaxValue {
     
    5153      return new ConstantTreeNode(this);
    5254    }
     55
     56    public override IDeepCloneable Clone(Cloner cloner) {
     57      Constant clone = (Constant) base.Clone(cloner);
     58      clone.minValue = minValue;
     59      clone.maxValue = maxValue;
     60      return clone;
     61    }
    5362  }
    5463}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/ConstantTreeNode.cs

    r3465 r3485  
    4141      set { constantValue = value; }
    4242    }
     43
     44    private ConstantTreeNode() : base() { }
     45
    4346    // copy constructor
    4447    private ConstantTreeNode(ConstantTreeNode original)
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs

    r3462 r3485  
    3636  public sealed class Variable : Symbol {
    3737    #region Properties
     38    [Storable]
    3839    private double weightNu;
    39     [Storable]
    4040    public double WeightNu {
    4141      get { return weightNu; }
    4242      set { weightNu = value; }
    4343    }
     44    [Storable]
    4445    private double weightSigma;
    45     [Storable]
    4646    public double WeightSigma {
    4747      get { return weightSigma; }
     
    5151      }
    5252    }
     53    [Storable]
    5354    private List<string> variableNames;
    54     [Storable]
    5555    public IEnumerable<string> VariableNames {
    5656      get { return variableNames; }
     
    7272      return new VariableTreeNode(this);
    7373    }
     74
     75    public override IDeepCloneable Clone(Cloner cloner) {
     76      Variable clone = (Variable)base.Clone(cloner);
     77      clone.weightNu = weightNu;
     78      clone.weightSigma = weightSigma;
     79      clone.variableNames = new List<string>(variableNames);
     80      return clone;
     81    }
    7482  }
    7583}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs

    r3465 r3485  
    3434      get { return (Variable)base.Symbol; }
    3535    }
     36    [Storable]
    3637    private double weight;
    37     [Storable]
    3838    public double Weight {
    3939      get { return weight; }
    4040      set { weight = value; }
    4141    }
     42    [Storable]
    4243    private string variableName;
    43     [Storable]
    4444    public string VariableName {
    4545      get { return variableName; }
    4646      set { variableName = value; }
    4747    }
     48
     49
     50    private VariableTreeNode() { }
    4851
    4952    // copy constructor
Note: See TracChangeset for help on using the changeset viewer.