Changeset 11861 for branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers
- Timestamp:
- 02/02/15 16:14:45 (10 years ago)
- Location:
- branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisModelComplexityAnalyzer.cs
r11407 r11861 52 52 double complexity = 1; 53 53 for (int i = 0; i < node.SubtreeCount; i++) { 54 complexity *= CalculateComplexity(node.GetSubtree(i)); 54 var nodeComplexity = CalculateComplexity(node.GetSubtree(i)); 55 complexity *= nodeComplexity > 2 ? nodeComplexity : 2; 56 55 57 } 56 58 return complexity == 1 ? node.SubtreeCount : complexity; … … 59 61 double complexity = 1; 60 62 for (int i = 0; i < node.SubtreeCount; i++) { 61 complexity *= CalculateComplexity(node.GetSubtree(i)); 63 var nodeComplexity = CalculateComplexity(node.GetSubtree(i)); 64 complexity *= nodeComplexity > 2 ? nodeComplexity : 2; 62 65 } 63 return complexity ;66 return complexity == 1 ? node.SubtreeCount : complexity; 64 67 } 65 68 case OpCodes.Sin: { 66 69 double complexity = CalculateComplexity(node.GetSubtree(0)); 67 return complexity * 10;70 return Math.Exp(complexity); 68 71 } 69 72 case OpCodes.Cos: { 70 73 double complexity = CalculateComplexity(node.GetSubtree(0)); 71 return complexity * 10;74 return Math.Exp(complexity); 72 75 } 73 76 case OpCodes.Tan: { 74 77 double complexity = CalculateComplexity(node.GetSubtree(0)); 75 return complexity * 10;78 return Math.Exp(complexity); 76 79 } 77 80 case OpCodes.Exp: { 78 81 double complexity = CalculateComplexity(node.GetSubtree(0)); 79 return complexity * 10;80 82 return Math.Exp(complexity); 83 } 81 84 case OpCodes.Log: { 82 85 double complexity = CalculateComplexity(node.GetSubtree(0)); 83 return complexity * 10;86 return Math.Exp(complexity); 84 87 } 85 88 case OpCodes.Square: { 86 89 double complexity = CalculateComplexity(node.GetSubtree(0)); 87 return 2* complexity;90 return complexity * complexity; 88 91 } 89 92 case OpCodes.SquareRoot: { 90 93 double complexity = CalculateComplexity(node.GetSubtree(0)); 91 return 10* complexity;94 return complexity * complexity * complexity; 92 95 } 93 96 case OpCodes.Power: { -
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationAnalyzer.cs
r11310 r11861 26 26 using HeuristicLab.Core; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Optimization; 28 29 using HeuristicLab.Parameters; 29 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 36 37 [StorableClass] 37 38 public abstract class SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> : SymbolicDataAnalysisSingleObjectiveAnalyzer, 38 ISymbolicDataAnalysisValidationAnalyzer<T, U> 39 ISymbolicDataAnalysisValidationAnalyzer<T, U>, IStochasticOperator 39 40 where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U> 40 41 where U : class, IDataAnalysisProblemData {
Note: See TracChangeset
for help on using the changeset viewer.