Changeset 11883 for branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 02/04/15 11:16:41 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisModelComplexityAnalyzer.cs
r11861 r11883 53 53 for (int i = 0; i < node.SubtreeCount; i++) { 54 54 var nodeComplexity = CalculateComplexity(node.GetSubtree(i)); 55 complexity *= nodeComplexity > 2 ? nodeComplexity : 2; 56 55 complexity *= nodeComplexity > 2 ? nodeComplexity : 2; 57 56 } 58 return complexity == 1 ? node.SubtreeCount : complexity;57 return complexity; 59 58 } 60 59 case OpCodes.Div: { … … 64 63 complexity *= nodeComplexity > 2 ? nodeComplexity : 2; 65 64 } 66 return complexity == 1 ? node.SubtreeCount : complexity;65 return complexity; 67 66 } 68 67 case OpCodes.Sin: { 69 68 double complexity = CalculateComplexity(node.GetSubtree(0)); 70 return Math. Exp(complexity);69 return Math.Pow(complexity, 2.0); 71 70 } 72 71 case OpCodes.Cos: { 73 72 double complexity = CalculateComplexity(node.GetSubtree(0)); 74 return Math. Exp(complexity);73 return Math.Pow(2.0, complexity); 75 74 } 76 75 case OpCodes.Tan: { 77 76 double complexity = CalculateComplexity(node.GetSubtree(0)); 78 return Math. Exp(complexity);77 return Math.Pow(2.0, complexity); ; 79 78 } 80 79 case OpCodes.Exp: { 81 80 double complexity = CalculateComplexity(node.GetSubtree(0)); 82 return Math.Exp(complexity);83 }81 return Math.Pow(2.0, complexity); 82 } 84 83 case OpCodes.Log: { 85 84 double complexity = CalculateComplexity(node.GetSubtree(0)); 86 return Math. Exp(complexity);85 return Math.Pow(2.0, complexity); 87 86 } 88 87 case OpCodes.Square: {
Note: See TracChangeset
for help on using the changeset viewer.