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:
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.DataAnalysis

  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs

    r4249 r4722  
    2121
    2222using System.Collections.Generic;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3031  [Item("ArithmeticExpressionGrammar", "Represents a grammar for functional expressions using only arithmetic operations.")]
    3132  public class ArithmeticExpressionGrammar : DefaultSymbolicExpressionGrammar {
     33
     34    [StorableConstructor]
     35    protected ArithmeticExpressionGrammar(bool deserializing) : base(deserializing) { }
     36    protected ArithmeticExpressionGrammar(ArithmeticExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
    3237    public ArithmeticExpressionGrammar()
    3338      : base() {
    3439      Initialize();
    3540    }
    36 
    37     [StorableConstructor]
    38     protected ArithmeticExpressionGrammar(bool deserializing) : base(deserializing) { }
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new ArithmeticExpressionGrammar(this, cloner);
     43    }
    3944
    4045    private void Initialize() {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs

    r4249 r4722  
    2121
    2222using System.Collections.Generic;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3031  [Item("FullFunctionalExpressionGrammar", "Represents a grammar for functional expressions using all available functions.")]
    3132  public class FullFunctionalExpressionGrammar : DefaultSymbolicExpressionGrammar {
     33    [StorableConstructor]
     34    protected FullFunctionalExpressionGrammar(bool deserializing) : base(deserializing) { }
     35    protected FullFunctionalExpressionGrammar(FullFunctionalExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
    3236    public FullFunctionalExpressionGrammar()
    3337      : base() {
    3438      Initialize();
    3539    }
    36     [StorableConstructor]
    37     protected FullFunctionalExpressionGrammar(bool deserializing) : base(deserializing) { }
     40
     41    public override IDeepCloneable Clone(Cloner cloner) {
     42      return new FullFunctionalExpressionGrammar(this, cloner);
     43    }
    3844
    3945    private void Initialize() {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SimpleArithmeticExpressionInterpreter.cs

    r4068 r4722  
    2222using System;
    2323using System.Collections.Generic;
     24using HeuristicLab.Common;
    2425using HeuristicLab.Core;
    2526using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3334  [Item("SimpleArithmeticExpressionInterpreter", "Interpreter for arithmetic symbolic expression trees including function calls.")]
    3435  // not thread safe!
    35   public class SimpleArithmeticExpressionInterpreter : NamedItem, ISymbolicExpressionTreeInterpreter {
     36  public sealed class SimpleArithmeticExpressionInterpreter : NamedItem, ISymbolicExpressionTreeInterpreter {
    3637    private class OpCodes {
    3738      public const byte Add = 1;
     
    106107    }
    107108
     109    [StorableConstructor]
     110    private SimpleArithmeticExpressionInterpreter(bool deserializing) : base(deserializing) { }
     111    private SimpleArithmeticExpressionInterpreter(SimpleArithmeticExpressionInterpreter original, Cloner cloner) : base(original, cloner) { }
     112
     113    public override IDeepCloneable Clone(Cloner cloner) {
     114      return new SimpleArithmeticExpressionInterpreter(this, cloner);
     115    }
     116
    108117    public SimpleArithmeticExpressionInterpreter()
    109118      : base() {
     
    286295
    287296    // skips a whole branch
    288     protected void SkipBakedCode() {
     297    private void SkipBakedCode() {
    289298      int i = 1;
    290299      while (i > 0) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Addition.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Addition", "Symbol that represents the + operator.")]
    2829  public sealed class Addition : Symbol {
     30    [StorableConstructor]
     31    private Addition(bool deserializing) : base(deserializing) { }
     32    private Addition(Addition original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Addition(this, cloner);
     35    }
    2936    public Addition() : base("Addition", "Symbol that represents the + operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/And.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("And", "Symbol that represents the boolean AND operator.")]
    2829  public sealed class And : Symbol {
     30    [StorableConstructor]
     31    private And(bool deserializing) : base(deserializing) { }
     32    private And(And original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new And(this, cloner);
     35    }
    2936    public And() : base("And", "Symbol that represents the boolean AND operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Average.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Average", "Symbol that represents the average (arithmetic mean) function.")]
    2829  public sealed class Average : Symbol {
     30    [StorableConstructor]
     31    private Average(bool deserializing) : base(deserializing) { }
     32    private Average(Average original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Average(this, cloner);
     35    }
    2936    public Average() : base("Average", "Symbol that represents the average (arithmetic mean) function.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Constant.cs

    r4068 r4722  
    7777    }
    7878    #endregion
     79    [StorableConstructor]
     80    private Constant(bool deserializing) : base(deserializing) { }
     81    private Constant(Constant original, Cloner cloner)
     82      : base(original, cloner) {
     83      minValue = original.minValue;
     84      maxValue = original.maxValue;
     85      manipulatorNu = original.manipulatorNu;
     86      manipulatorSigma = original.manipulatorSigma;
     87    }
    7988    public Constant()
    8089      : base("Constant", "Represents a constant value.") {
     
    9099
    91100    public override IDeepCloneable Clone(Cloner cloner) {
    92       Constant clone = (Constant)base.Clone(cloner);
    93       clone.minValue = minValue;
    94       clone.maxValue = maxValue;
    95       clone.manipulatorNu = manipulatorNu;
    96       clone.manipulatorSigma = manipulatorSigma;
    97       return clone;
     101      return new Constant(this, cloner);
    98102    }
    99103  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/ConstantTreeNode.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
     
    3839    }
    3940
    40     private ConstantTreeNode() : base() { }
     41    [StorableConstructor]
     42    private ConstantTreeNode(bool deserializing) : base(deserializing) { }
    4143
    42     // copy constructor
    43     private ConstantTreeNode(ConstantTreeNode original)
    44       : base(original) {
     44    private ConstantTreeNode(ConstantTreeNode original, Cloner cloner)
     45      : base(original, cloner) {
    4546      constantValue = original.constantValue;
    4647    }
    4748
     49    private ConstantTreeNode() : base() { }
    4850    public ConstantTreeNode(Constant constantSymbol) : base(constantSymbol) { }
    4951
     
    6567    }
    6668
    67     public override object Clone() {
    68       return new ConstantTreeNode(this);
     69    public override IDeepCloneable Clone(Cloner cloner) {
     70      return new ConstantTreeNode(this, cloner);
    6971    }
    7072
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Cosine.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Cosine", "Symbol that represents the cosine function.")]
    2829  public sealed class Cosine : Symbol {
     30    [StorableConstructor]
     31    private Cosine(bool deserializing) : base(deserializing) { }
     32    private Cosine(Cosine original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Cosine(this, cloner);
     35    }
    2936    public Cosine() : base("Cosine", "Symbol that represents the cosine function.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Division.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Division", "Symbol that represents the / operator.")]
    2829  public sealed class Division : Symbol {
     30    [StorableConstructor]
     31    private Division(bool deserializing) : base(deserializing) { }
     32    private Division(Division original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Division(this, cloner);
     35    }
    2936    public Division() : base("Division", "Symbol that represents the / operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Exponential.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Exponential", "Symbol that represents the exponential function.")]
    2829  public sealed class Exponential : Symbol {
     30    [StorableConstructor]
     31    private Exponential(bool deserializing) : base(deserializing) { }
     32    private Exponential(Exponential original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Exponential(this, cloner);
     35    }
    2936    public Exponential() : base("Exponential", "Symbol that represents the exponential function.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/GreaterThan.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("GreaterThan", "Symbol that represents a greater than relation.")]
    2829  public sealed class GreaterThan : Symbol {
     30    [StorableConstructor]
     31    private GreaterThan(bool deserializing) : base(deserializing) { }
     32    private GreaterThan(GreaterThan original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new GreaterThan(this, cloner);
     35    }
    2936    public GreaterThan() : base("GreaterThan", "Symbol that represents a greater than relation.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/IfThenElse.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("IfThenElse", "Symbol that represents a conditional operator.")]
    2829  public sealed class IfThenElse : Symbol {
     30    [StorableConstructor]
     31    private IfThenElse(bool deserializing) : base(deserializing) { }
     32    private IfThenElse(IfThenElse original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new IfThenElse(this, cloner);
     35    }
    2936    public IfThenElse() : base("IfThenElse", "Symbol that represents a conditional operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariable.cs

    r4068 r4722  
    4040      set { maxLag = value; }
    4141    }
     42    [StorableConstructor]
     43    private LaggedVariable(bool deserializing) : base(deserializing) { }
     44    private LaggedVariable(LaggedVariable original, Cloner cloner)
     45      : base(original, cloner) {
     46      minLag = original.minLag;
     47      maxLag = original.maxLag;
     48    }
    4249    public LaggedVariable()
    4350      : base("LaggedVariable", "Represents a variable value with a time offset.") {
     
    5057
    5158    public override IDeepCloneable Clone(Cloner cloner) {
    52       LaggedVariable clone = (LaggedVariable)base.Clone(cloner);
    53       clone.minLag = minLag;
    54       clone.maxLag = maxLag;
    55       return clone;
     59      return new LaggedVariable(this, cloner);
    5660    }
    5761  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LaggedVariableTreeNode.cs

    r4068 r4722  
    2121
    2222using System;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3637    }
    3738
    38     private LaggedVariableTreeNode() { }
    39 
    40     // copy constructor
    41     private LaggedVariableTreeNode(LaggedVariableTreeNode original)
    42       : base(original) {
     39    [StorableConstructor]
     40    private LaggedVariableTreeNode(bool deserializing) : base(deserializing) { }
     41    private LaggedVariableTreeNode(LaggedVariableTreeNode original, Cloner cloner)
     42      : base(original, cloner) {
    4343      lag = original.lag;
    4444    }
     45    private LaggedVariableTreeNode() { }
    4546
    4647    public LaggedVariableTreeNode(LaggedVariable variableSymbol) : base(variableSymbol) { }
     
    6263    }
    6364
    64 
    65     public override object Clone() {
    66       return new LaggedVariableTreeNode(this);
     65    public override IDeepCloneable Clone(Cloner cloner) {
     66      return new LaggedVariableTreeNode(this, cloner);
    6767    }
    6868
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/LessThan.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("LessThan", "Symbol that represents a less than relation.")]
    2829  public sealed class LessThan : Symbol {
     30    [StorableConstructor]
     31    private LessThan(bool deserializing) : base(deserializing) { }
     32    private LessThan(LessThan original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new LessThan(this, cloner);
     35    }
    2936    public LessThan() : base("LessThan", "Symbol that represents a less than relation.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Logarithm.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Logarithm", "Symbol that represents the logarithm function.")]
    2829  public sealed class Logarithm : Symbol {
     30    [StorableConstructor]
     31    private Logarithm(bool deserializing) : base(deserializing) { }
     32    private Logarithm(Logarithm original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Logarithm(this, cloner);
     35    }
    2936    public Logarithm() : base("Logarithm", "Symbol that represents the logarithm function.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Multiplication.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Multiplication", "Symbol that represents the * operator.")]
    2829  public sealed class Multiplication : Symbol {
     30    [StorableConstructor]
     31    private Multiplication(bool deserializing) : base(deserializing) { }
     32    private Multiplication(Multiplication original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Multiplication(this, cloner);
     35    }
    2936    public Multiplication() : base("Multiplication", "Symbol that represents the * operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Not.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Not", "Symbol that represents the boolean NOT operator.")]
    2829  public sealed class Not : Symbol {
     30    [StorableConstructor]
     31    private Not(bool deserializing) : base(deserializing) { }
     32    private Not(Not original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Not(this, cloner);
     35    }
    2936    public Not() : base("Not", "Symbol that represents the boolean NOT operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Or.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Or", "Symbol that represents the boolean OR operator.")]
    2829  public sealed class Or : Symbol {
     30    [StorableConstructor]
     31    private Or(bool deserializing) : base(deserializing) { }
     32    private Or(Or original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Or(this, cloner);
     35    }
    2936    public Or() : base("Or", "Symbol that represents the boolean OR operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Sine.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Sine", "Symbol that represents the sine function.")]
    2829  public sealed class Sine : Symbol {
     30    [StorableConstructor]
     31    private Sine(bool deserializing) : base(deserializing) { }
     32    private Sine(Sine original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Sine(this, cloner);
     35    }
    2936    public Sine() : base("Sine", "Symbol that represents the sine function.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Subtraction.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Subtraction", "Symbol that represents the - operator.")]
    2829  public sealed class Subtraction : Symbol {
     30    [StorableConstructor]
     31    private Subtraction(bool deserializing) : base(deserializing) { }
     32    private Subtraction(Subtraction original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Subtraction(this, cloner);
     35    }
    2936    public Subtraction() : base("Subtraction", "Symbol that represents the - operator.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Tangent.cs

    r4068 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
     
    2728  [Item("Tangent", "Symbol that represents the tangent trigonometric function.")]
    2829  public sealed class Tangent : Symbol {
     30    [StorableConstructor]
     31    private Tangent(bool deserializing) : base(deserializing) { }
     32    private Tangent(Tangent original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new Tangent(this, cloner);
     35    }
    2936    public Tangent() : base("Tangent", "Symbol that represents the tangent trigonometric function.") { }
    3037  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/Variable.cs

    r4068 r4722  
    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      weightNu = original.weightNu;
     99      weightSigma = original.weightSigma;
     100      variableNames = new List<string>(original.variableNames);
     101      weightManipulatorNu = original.weightManipulatorNu;
     102      weightManipulatorSigma = original.weightManipulatorSigma;
     103    }
    92104    public Variable() : this("Variable", "Represents a variable value.") { }
    93105    public Variable(string name, string description)
     
    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  }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/Symbols/VariableTreeNode.cs

    r4239 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Common;
    2424using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    4444    }
    4545
    46 
    47     protected VariableTreeNode() { }
    48 
    49     // copy constructor
    50     protected VariableTreeNode(VariableTreeNode original)
    51       : base(original) {
     46    [StorableConstructor]
     47    protected VariableTreeNode(bool deserializing) : base(deserializing) { }
     48    protected VariableTreeNode(VariableTreeNode original, Cloner cloner)
     49      : base(original, cloner) {
    5250      weight = original.weight;
    5351      variableName = original.variableName;
    5452    }
    55 
     53    protected VariableTreeNode() { }
    5654    public VariableTreeNode(Variable variableSymbol) : base(variableSymbol) { }
    5755
     
    7573    }
    7674
    77 
    78     public override object Clone() {
    79       return new VariableTreeNode(this);
     75    public override IDeepCloneable Clone(Cloner cloner) {
     76      return new VariableTreeNode(this, cloner);
    8077    }
    8178
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/VariableFrequencyAnalyser.cs

    r4125 r4722  
    2222using System.Collections.Generic;
    2323using System.Linq;
     24using HeuristicLab.Common;
    2425using HeuristicLab.Core;
    2526using HeuristicLab.Data;
     
    6162    }
    6263    #endregion
     64    [StorableConstructor]
     65    protected VariableFrequencyAnalyser(bool deserializing) : base(deserializing) { }
     66    protected VariableFrequencyAnalyser(VariableFrequencyAnalyser original, Cloner cloner)
     67      : base(original, cloner) {
     68    }
    6369    public VariableFrequencyAnalyser()
    6470      : base() {
     
    8086        VariableFrequencies[lastRowIndex, columnIndex] = pair.Value;
    8187      }
    82       return null;
     88      return base.Apply();
    8389    }
    8490
Note: See TracChangeset for help on using the changeset viewer.