- Timestamp:
- 04/13/10 20:44:31 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs
r3294 r3338 34 34 } 35 35 } 36 37 private int argumentIndex; 38 public int ArgumentIndex { 39 get { return argumentIndex; } 40 } 41 42 public Argument(int argumentIndex) 43 : base() { 44 this.argumentIndex = argumentIndex; 45 this.name = "ARG" + argumentIndex; 46 } 47 36 48 public override SymbolicExpressionTreeNode CreateTreeNode() { 37 49 return new ArgumentTreeNode(this); -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ArgumentTreeNode.cs
r3294 r3338 25 25 [StorableClass] 26 26 public sealed class ArgumentTreeNode : SymbolicExpressionTreeNode { 27 private int argumentIndex; 28 [Storable] 29 public int ArgumentIndex { 30 get { return argumentIndex; } 31 set { argumentIndex = value; } 27 public new Argument Symbol { 28 get { return (Argument)base.Symbol; } 29 set { 30 if (value == null) throw new ArgumentNullException(); 31 if(!(value is Argument)) throw new ArgumentException(); 32 base.Symbol = value; 33 } 32 34 } 33 35 34 36 // copy constructor 35 37 private ArgumentTreeNode(ArgumentTreeNode original) 36 38 : base(original) { 37 argumentIndex = original.argumentIndex;38 39 } 39 40 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs
r3294 r3338 34 34 } 35 35 } 36 36 37 public override SymbolicExpressionTreeNode CreateTreeNode() { 37 38 return new DefunTreeNode(this); -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/DefunTreeNode.cs
r3294 r3338 22 22 using System; 23 23 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 24 using HeuristicLab.Core; 24 25 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.GeneralSymbols { 25 26 [StorableClass] … … 31 32 set { numberOfArguments = value; } 32 33 } 33 private string name;34 private string functionName; 34 35 [Storable] 35 public string Name { 36 get { return name; } 37 set { this.name = value; } 36 public string FunctionName { 37 get { return functionName; } 38 set { this.functionName = value; } 39 } 40 41 private new Defun Symbol { 42 get { return (Defun)base.Symbol; } 38 43 } 39 44 … … 41 46 private DefunTreeNode(DefunTreeNode original) 42 47 : base(original) { 43 name = original.Name;48 functionName = original.functionName; 44 49 numberOfArguments = original.numberOfArguments; 45 50 } 46 51 47 52 public DefunTreeNode(Defun defunSymbol) : base(defunSymbol) { } 53 48 54 49 55 public override object Clone() { -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs
r3294 r3338 34 34 } 35 35 } 36 public string FunctionName { get; set; } 37 38 public InvokeFunction(string functionName) 39 : base() { 40 this.FunctionName = functionName; 41 this.name = "Invoke: " + functionName; 42 } 43 36 44 public override SymbolicExpressionTreeNode CreateTreeNode() { 37 45 return new InvokeFunctionTreeNode(this); -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunctionTreeNode.cs
r3294 r3338 25 25 [StorableClass] 26 26 public sealed class InvokeFunctionTreeNode : SymbolicExpressionTreeNode { 27 private string invokedFunctionName; 28 [Storable] 29 public string InvokedFunctionName { 30 get { return invokedFunctionName; } 31 set { this.invokedFunctionName = value; } 27 public new InvokeFunction Symbol { 28 get { return (InvokeFunction)base.Symbol; } 32 29 } 33 30 … … 35 32 private InvokeFunctionTreeNode(InvokeFunctionTreeNode original) 36 33 : base(original) { 37 invokedFunctionName = original.invokedFunctionName;38 34 } 39 35 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/StartSymbol.cs
r3294 r3338 31 31 } 32 32 } 33 34 public override SymbolicExpressionTreeNode CreateTreeNode() { 35 return new StartSymbolTreeNode(this); 36 } 33 37 } 34 38 }
Note: See TracChangeset
for help on using the changeset viewer.