Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10790


Ignore:
Timestamp:
04/24/14 09:49:16 (10 years ago)
Author:
mkommend
Message:

#2177: Added asserts for xor symbol in the interpreter evaluation test method.

Location:
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicDataAnalysisExpressionTreeInterpreterTest.cs

    r9956 r10790  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Diagnostics;
    2524using System.Globalization;
    2625using System.Linq;
    27 using System.Linq.Expressions;
    2826using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2927using HeuristicLab.Random;
     
    319317      Evaluate(interpreter, ds, "(and (log -1.0)  1.0)", 0, -1.0); // (and NaN 1.0)
    320318
    321 
    322319      // OR
    323320      Evaluate(interpreter, ds, "(or -1.0 -2.0)", 0, -1.0);
     
    330327      Evaluate(interpreter, ds, "(or (log -1.0))", 0, -1.0); // (or NaN)
    331328      Evaluate(interpreter, ds, "(or (log -1.0)  1.0)", 0, -1.0); // (or NaN 1.0)
     329
     330      // XOR
     331      Evaluate(interpreter, ds, "(xor -1.0 -2.0)", 0, -1.0);
     332      Evaluate(interpreter, ds, "(xor -1.0 2.0)", 0, 1.0);
     333      Evaluate(interpreter, ds, "(xor 1.0 -2.0)", 0, 1.0);
     334      Evaluate(interpreter, ds, "(xor 1.0 2.0)", 0, -1.0);
     335      Evaluate(interpreter, ds, "(xor 0.0 0.0)", 0, -1.0);
     336      Evaluate(interpreter, ds, "(xor -1.0 -2.0 -3.0)", 0, -1.0);
     337      Evaluate(interpreter, ds, "(xor -1.0 -2.0 3.0)", 0, 1.0);
     338      Evaluate(interpreter, ds, "(xor -1.0 2.0 3.0)", 0, -1.0);
     339      Evaluate(interpreter, ds, "(xor 1.0 2.0 3.0)", 0, 1.0);
     340      Evaluate(interpreter, ds, "(xor (log -1.0))", 0, -1.0);
     341      Evaluate(interpreter, ds, "(xor (log -1.0)  1.0)", 0, 1.0);
    332342
    333343      // sin, cos, tan
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/SymbolicExpressionImporter.cs

    r9785 r10790  
    7070        {"OR", new Or()},
    7171        {"NOT", new Not()},
     72        {"XOR", new Xor()},
    7273        {"DIFF", new Derivative()},
    7374        {"PROG", new ProgramRootSymbol()},
Note: See TracChangeset for help on using the changeset viewer.