Changeset 13013 for branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators
- Timestamp:
- 10/15/15 16:39:12 (9 years ago)
- Location:
- branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators/Addition.cs
r13011 r13013 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 28 29 namespace HeuristicLab.Problems.GeneticProgramming.Robo Code {29 namespace HeuristicLab.Problems.GeneticProgramming.Robocode { 30 30 [StorableClass] 31 31 public class Addition : CodeNode, INumericalOperator { … … 55 55 public override string Interpret(ISymbolicExpressionTreeNode node, IEnumerable<ISymbolicExpressionTreeNode> children) { 56 56 if (children.Count() < 2) 57 throw new ArgumentException("Expected at leas et 2children.", "children");57 throw new ArgumentException("Expected at least two children.", "children"); 58 58 59 59 string result = string.Join(" + ", children.Select(c => ((CodeNode)c.Symbol).Interpret(c, c.Subtrees))); -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators/Division.cs
r13011 r13013 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 28 29 namespace HeuristicLab.Problems.GeneticProgramming.Robo Code {29 namespace HeuristicLab.Problems.GeneticProgramming.Robocode { 30 30 [StorableClass] 31 31 public class Division : CodeNode, INumericalOperator { … … 55 55 public override string Interpret(ISymbolicExpressionTreeNode node, IEnumerable<ISymbolicExpressionTreeNode> children) { 56 56 if (children.Count() < 2) 57 throw new ArgumentException("Expected at leas et 2children.", "children");57 throw new ArgumentException("Expected at least two children.", "children"); 58 58 59 59 string result = string.Join(" / ", children.Select(c => ((CodeNode)c.Symbol).Interpret(c, c.Subtrees))); -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators/INumericalOperator.cs
r13011 r13013 20 20 #endregion 21 21 22 namespace HeuristicLab.Problems.GeneticProgramming.Robo Code {22 namespace HeuristicLab.Problems.GeneticProgramming.Robocode { 23 23 public interface INumericalOperator { } 24 24 } -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators/Modulus.cs
r13011 r13013 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 28 29 namespace HeuristicLab.Problems.GeneticProgramming.Robo Code {29 namespace HeuristicLab.Problems.GeneticProgramming.Robocode { 30 30 [StorableClass] 31 31 public class Modulus : CodeNode, INumericalOperator { … … 55 55 public override string Interpret(ISymbolicExpressionTreeNode node, IEnumerable<ISymbolicExpressionTreeNode> children) { 56 56 if (children.Count() < 2) 57 throw new ArgumentException("Expected at leas et 2children.", "children");57 throw new ArgumentException("Expected at least two children.", "children"); 58 58 59 59 string result = string.Join(" % ", children.Select(c => ((CodeNode)c.Symbol).Interpret(c, c.Subtrees))); -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators/Multiplication.cs
r13011 r13013 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 28 29 namespace HeuristicLab.Problems.GeneticProgramming.Robo Code {29 namespace HeuristicLab.Problems.GeneticProgramming.Robocode { 30 30 [StorableClass] 31 31 public class Multiplication : CodeNode, INumericalOperator { … … 55 55 public override string Interpret(ISymbolicExpressionTreeNode node, IEnumerable<ISymbolicExpressionTreeNode> children) { 56 56 if (children.Count() < 2) 57 throw new ArgumentException("Expected at leas et 2children.", "children");57 throw new ArgumentException("Expected at least two children.", "children"); 58 58 59 59 string result = string.Join(" * ", children.Select(c => ((CodeNode)c.Symbol).Interpret(c, c.Subtrees))); -
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Numerical Expressions/Numerical Operators/Subtraction.cs
r13011 r13013 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 28 29 namespace HeuristicLab.Problems.GeneticProgramming.Robo Code {29 namespace HeuristicLab.Problems.GeneticProgramming.Robocode { 30 30 [StorableClass] 31 31 public class Subtraction : CodeNode, INumericalOperator { … … 55 55 public override string Interpret(ISymbolicExpressionTreeNode node, IEnumerable<ISymbolicExpressionTreeNode> children) { 56 56 if (children.Count() < 2) 57 throw new ArgumentException("Expected at leas et 2children.", "children");57 throw new ArgumentException("Expected at least two children.", "children"); 58 58 59 59 string result = string.Join(" - ", children.Select(c => ((CodeNode)c.Symbol).Interpret(c, c.Subtrees)));
Note: See TracChangeset
for help on using the changeset viewer.