Changeset 18146 for branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs
- Timestamp:
- 12/16/21 14:23:48 (3 years ago)
- Location:
- branches/3136_Structural_GP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP
- Property svn:mergeinfo changed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs
r17958 r18146 66 66 var abs = new Absolute(); 67 67 var aq = new AnalyticQuotient(); 68 var number = new Number(); 69 number.MinValue = -20; 70 number.MaxValue = 20; 68 71 var constant = new Constant(); 69 constant.MinValue = -20; 70 constant.MaxValue = 20; 72 constant.Enabled = false; 71 73 var variableSymbol = new Variable(); 72 74 … … 78 80 //all other symbols 79 81 var allSymbols = new List<Symbol> { 80 add, sub, mul, div, constant, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp,82 add, sub, mul, div, number, constant, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp, 81 83 tanh, aq, abs 82 84 }; … … 86 88 var realValueSymbols = new List<Symbol> { 87 89 add, sub, mul, div, sin, cos, tan, tanh, exp, log, aq, abs, square, cube, sqrt, cbrt, 88 variableSymbol, constant,90 variableSymbol, number, constant 89 91 }; 90 92 … … 113 115 //Define childs for offset 114 116 AddAllowedChildSymbol(offset, scaling, 0); 115 AddAllowedChildSymbol(offset, constant, 1);117 AddAllowedChildSymbol(offset, number, 1); 116 118 117 119 //Define childs for scaling 118 120 foreach (var symb in allSymbols) AddAllowedChildSymbol(scaling, symb, 0); 119 AddAllowedChildSymbol(scaling, constant, 1);121 AddAllowedChildSymbol(scaling, number, 1); 120 122 121 123 //Define childs for realvalue symbols … … 129 131 Symbols.First(s => s is CubeRoot).Enabled = false; 130 132 Symbols.First(s => s is Absolute).Enabled = false; 133 Symbols.First(s => s is Constant).Enabled = false; 131 134 } 132 135 }
Note: See TracChangeset
for help on using the changeset viewer.