- Timestamp:
- 04/22/10 08:51:33 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs
r3462 r3484 35 35 } 36 36 } 37 37 [Storable] 38 38 private int argumentIndex; 39 39 public int ArgumentIndex { 40 40 get { return argumentIndex; } 41 41 } 42 43 private Argument() : base() { } 42 44 43 45 public Argument(int argumentIndex) … … 50 52 return new ArgumentTreeNode(this); 51 53 } 54 55 public override IDeepCloneable Clone(Cloner cloner) { 56 Argument clone = (Argument)base.Clone(cloner); 57 clone.argumentIndex = argumentIndex; 58 clone.name = "ARG" + argumentIndex; 59 return clone; 60 } 52 61 } 53 62 } -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ArgumentTreeNode.cs
r3462 r3484 29 29 set { 30 30 if (value == null) throw new ArgumentNullException(); 31 if (!(value is Argument)) throw new ArgumentException();32 base.Symbol = value; 31 if (!(value is Argument)) throw new ArgumentException(); 32 base.Symbol = value; 33 33 } 34 34 } 35 35 36 private ArgumentTreeNode() : base() { } 37 36 38 // copy constructor 37 39 private ArgumentTreeNode(ArgumentTreeNode original) -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs
r3462 r3484 40 40 } 41 41 42 private DefunTreeNode() : base() { } 43 42 44 // copy constructor 43 45 private DefunTreeNode(DefunTreeNode original) -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs
r3462 r3484 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using System; 25 26 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols { 26 27 /// <summary> … … 35 36 } 36 37 } 37 public string FunctionName { get; set; } 38 [Storable] 39 private string functionName; 40 public string FunctionName { 41 get { return functionName; } 42 set { 43 if (value == null) throw new ArgumentNullException(); 44 functionName = value; 45 } 46 } 47 48 private InvokeFunction() : base() { } 38 49 39 50 public InvokeFunction(string functionName) … … 46 57 return new InvokeFunctionTreeNode(this); 47 58 } 59 60 public override IDeepCloneable Clone(Cloner cloner) { 61 InvokeFunction clone = (InvokeFunction)base.Clone(cloner); 62 clone.functionName = functionName; 63 clone.name = "Invoke: " + functionName; 64 return clone; 65 } 48 66 } 49 67 } -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunctionTreeNode.cs
r3462 r3484 34 34 } 35 35 36 private InvokeFunctionTreeNode() : base() { } 37 36 38 // copy constructor 37 39 private InvokeFunctionTreeNode(InvokeFunctionTreeNode original) -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs
r3462 r3484 35 35 public abstract class Symbol : NamedItem { 36 36 #region Properties 37 [Storable] 37 38 private double initialFrequency; 38 39 public double InitialFrequency { … … 55 56 return new SymbolicExpressionTreeNode(this); 56 57 } 58 59 public override IDeepCloneable Clone(Cloner cloner) { 60 Symbol clone = (Symbol) base.Clone(cloner); 61 clone.initialFrequency = initialFrequency; 62 return clone; 63 } 57 64 } 58 65 }
Note: See TracChangeset
for help on using the changeset viewer.