Changeset 13013 for branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Logical Expressions/Negation.cs
- Timestamp:
- 10/15/15 16:39:12 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Symbols/Logical Expressions/Negation.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 Negation : CodeNode { … … 60 60 var symbol = exprTree.Symbol; 61 61 if (!(symbol is LogicalValue || symbol is Conjunction || symbol is Disjunction || symbol is Negation || symbol is ILogicalComparator)) 62 throw new System.Exception("Negation was given a child of type " + symbol.GetType() + 63 ". The expected child must be of type " + typeof(LogicalValue) 64 + " or " + typeof(Conjunction) 65 + " or " + typeof(Disjunction) 66 + " or " + typeof(Negation) 67 + " or " + typeof(ILogicalComparator) + "."); 62 throw new InvalidProgramException("Negation was given a child of type " + symbol.GetType() + 63 ". The expected child must be of type LogicalValue or Conjunction or Disjunction or Negation or ILogicalComparator."); 68 64 69 65 return Prefix + ((CodeNode)symbol).Interpret(exprTree, exprTree.Subtrees) + Suffix;
Note: See TracChangeset
for help on using the changeset viewer.