Changeset 9630 for branches/Robocode/HeuristicLab.Problems.Robocode/Symbols/Numerical Expressions/Numerical Operators/Division.cs
- Timestamp:
- 06/14/13 11:03:13 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode/HeuristicLab.Problems.Robocode/Symbols/Numerical Expressions/Numerical Operators/Division.cs
r9565 r9630 3 3 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 4 4 5 namespace HeuristicLab.Problems.Robocode 6 { 7 [StorableClass] 8 public class Division : CodeNode 9 { 10 public override int MinimumArity { get { return 0; } } 11 public override int MaximumArity { get { return 0; } } 5 namespace HeuristicLab.Problems.Robocode { 6 [StorableClass] 7 public class Division : CodeNode { 8 public override int MinimumArity { get { return 0; } } 9 public override int MaximumArity { get { return 0; } } 12 10 13 14 11 [Storable] 12 public override string Prefix { get; set; } 15 13 16 17 14 [Storable] 15 public override string Suffix { get; set; } 18 16 19 [StorableConstructor] 20 private Division(bool deserializing) : base(deserializing) { } 21 private Division(Division original, Cloner cloner) 22 : base(original, cloner) 23 { 24 this.Prefix = "/"; 25 this.Suffix = ""; 26 } 17 [StorableConstructor] 18 private Division(bool deserializing) : base(deserializing) { } 19 private Division(Division original, Cloner cloner) 20 : base(original, cloner) { 27 21 28 public Division() 29 : base("Division", "Division operator.") 30 { 31 this.Prefix = "/"; 32 this.Suffix = ""; 33 } 22 } 34 23 35 public override IDeepCloneable Clone(Cloner cloner) 36 { 37 return new Division(this, cloner); 38 } 24 public Division() 25 : base("Division", "Division operator.") { 26 this.Prefix = "/"; 27 this.Suffix = ""; 28 } 39 29 40 public override string Interpret(ISymbolicExpressionTreeNode node, System.Collections.Generic.IEnumerable<ISymbolicExpressionTreeNode> children) 41 { 42 return this.Prefix + this.Suffix; 43 } 30 public override IDeepCloneable Clone(Cloner cloner) { 31 return new Division(this, cloner); 44 32 } 33 34 public override string Interpret(ISymbolicExpressionTreeNode node, System.Collections.Generic.IEnumerable<ISymbolicExpressionTreeNode> children) { 35 return this.Prefix + this.Suffix; 36 } 37 } 45 38 }
Note: See TracChangeset
for help on using the changeset viewer.