Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/18/10 09:28:53 (15 years ago)
Author:
gkronber
Message:

Fixed test-cases for constant expressions and expressions of one argument and fixed a bug in the network transformation operator. #833

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.Tests/NetworkToFunctionTransformerTest.cs

    r2627 r2633  
    235235      {
    236236        // expression with one parameter
    237         IFunctionTree tree = importer.Import(@"(f1-* (variable 1.0 a 0) (variable 1.0 d 0))");
     237        IFunctionTree tree = importer.Import(@"(f1-* (open-param - 0) (variable 1.0 d 0))");
    238238
    239239        IEnumerable<IFunctionTree> actualTrees = NetworkToFunctionTransformer_Accessor.Transform(tree, new List<string>() { "a", "b", "c" });
     
    250250      {
    251251        // expression with one parameter
    252         IFunctionTree tree = importer.Import(@"(open-log (variable 1.0 a 0))");
     252        IFunctionTree tree = importer.Import(@"(open-log (open-param - 0))");
    253253
    254254        IEnumerable<IFunctionTree> actualTrees = NetworkToFunctionTransformer_Accessor.Transform(tree, new List<string>() { "a", "b", "c" });
     
    265265      {
    266266        // expression with flip and one parameter
    267         IFunctionTree tree = importer.Import(@"(flip (open-log (variable 1.0 a 0)))");
     267        IFunctionTree tree = importer.Import(@"(flip (open-log (open-param - 0)))");
    268268
    269269        IEnumerable<IFunctionTree> actualTrees = NetworkToFunctionTransformer_Accessor.Transform(tree, new List<string>() { "a", "b", "c" });
     
    272272        IFunctionTree t1 = importer.Import("(exp (variable 1.0 a 0))");
    273273        IFunctionTree t2 = importer.Import("(exp (variable 1.0 a 0))");
     274
     275
     276        CompareTrees(actualTrees, new List<IFunctionTree>() {
     277        t0, t1, t2
     278        });
     279      }
     280
     281      {
     282        // expression with flip and one parameter
     283        IFunctionTree tree = importer.Import(@"(open-param - 0)");
     284
     285        IEnumerable<IFunctionTree> actualTrees = NetworkToFunctionTransformer_Accessor.Transform(tree, new List<string>() { "a", "b", "c" });
     286
     287        IFunctionTree t0 = importer.Import("(variable 1.0 b 0)");
     288        IFunctionTree t1 = importer.Import("(variable 1.0 a 0)");
     289        IFunctionTree t2 = importer.Import("(variable 1.0 a 0)");
    274290
    275291
Note: See TracChangeset for help on using the changeset viewer.