Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/04/15 11:16:41 (10 years ago)
Author:
mkommend
Message:

#2175: Additional calculation of results for EuroCast 2015.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisModelComplexityAnalyzer.cs

    r11861 r11883  
    5353            for (int i = 0; i < node.SubtreeCount; i++) {
    5454              var nodeComplexity = CalculateComplexity(node.GetSubtree(i));
    55               complexity *=  nodeComplexity > 2 ? nodeComplexity : 2;
    56              
     55              complexity *= nodeComplexity > 2 ? nodeComplexity : 2;
    5756            }
    58             return complexity == 1 ? node.SubtreeCount : complexity;
     57            return complexity;
    5958          }
    6059        case OpCodes.Div: {
     
    6463              complexity *= nodeComplexity > 2 ? nodeComplexity : 2;
    6564            }
    66             return complexity == 1 ? node.SubtreeCount : complexity;
     65            return complexity;
    6766          }
    6867        case OpCodes.Sin: {
    6968            double complexity = CalculateComplexity(node.GetSubtree(0));
    70             return Math.Exp(complexity);
     69            return Math.Pow(complexity, 2.0);
    7170          }
    7271        case OpCodes.Cos: {
    7372            double complexity = CalculateComplexity(node.GetSubtree(0));
    74             return Math.Exp(complexity);
     73            return Math.Pow(2.0, complexity);
    7574          }
    7675        case OpCodes.Tan: {
    7776            double complexity = CalculateComplexity(node.GetSubtree(0));
    78             return Math.Exp(complexity);
     77            return Math.Pow(2.0, complexity); ;
    7978          }
    8079        case OpCodes.Exp: {
    8180            double complexity = CalculateComplexity(node.GetSubtree(0));
    82           return Math.Exp(complexity);
    83         }
     81            return Math.Pow(2.0, complexity);
     82          }
    8483        case OpCodes.Log: {
    8584            double complexity = CalculateComplexity(node.GetSubtree(0));
    86             return Math.Exp(complexity);
     85            return Math.Pow(2.0, complexity);
    8786          }
    8887        case OpCodes.Square: {
Note: See TracChangeset for help on using the changeset viewer.