Changeset 18093 for branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars
- Timestamp:
- 11/24/21 13:40:39 (3 years ago)
- Location:
- branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs
r17413 r18093 49 49 var mul = new Multiplication(); 50 50 var div = new Division(); 51 var constant = new Constant();51 var constant = new Num(); 52 52 constant.MinValue = -20; 53 53 constant.MaxValue = 20; 54 var number = new RealConstant(); 55 number.MinValue = -20; 56 number.MaxValue = 20; 54 57 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 55 58 var binFactorVariableSymbol = new BinaryFactorVariable(); 56 59 var factorVariableSymbol = new FactorVariable(); 57 60 58 var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol, binFactorVariableSymbol, factorVariableSymbol };61 var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, number, variableSymbol, binFactorVariableSymbol, factorVariableSymbol }; 59 62 var functionSymbols = new List<Symbol>() { add, sub, mul, div }; 60 63 … … 66 69 } 67 70 SetSubtreeCount(constant, 0, 0); 71 SetSubtreeCount(number, 0, 0); 68 72 SetSubtreeCount(variableSymbol, 0, 0); 69 73 SetSubtreeCount(binFactorVariableSymbol, 0, 0); -
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
r17413 r18093 118 118 variableCondition.InitialFrequency = 0.0; 119 119 120 var constant = new Constant();120 var constant = new Num(); 121 121 constant.MinValue = -20; 122 122 constant.MaxValue = 20; … … 130 130 autoregressiveVariable.Enabled = false; 131 131 132 var number = new RealConstant(); 133 number.MinValue = -20; 134 number.MaxValue = 20; 135 132 136 var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, tanh, 133 137 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral, 134 @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };138 @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, number, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition }; 135 139 var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, tanh, not, timeLag, integral, derivative, 136 140 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral … … 139 143 var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition }; 140 144 var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor }; 141 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable };145 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, number, laggedVariable, autoregressiveVariable }; 142 146 143 147 foreach (var symb in allSymbols) -
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs
r17958 r18093 66 66 var abs = new Absolute(); 67 67 var aq = new AnalyticQuotient(); 68 var constant = new Constant();68 var constant = new Num(); 69 69 constant.MinValue = -20; 70 70 constant.MaxValue = 20; 71 var number = new RealConstant(); 72 number.MinValue = -20; 73 number.MaxValue = 20; 71 74 var variableSymbol = new Variable(); 72 75 … … 78 81 //all other symbols 79 82 var allSymbols = new List<Symbol> { 80 add, sub, mul, div, constant, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp,83 add, sub, mul, div, constant, number, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp, 81 84 tanh, aq, abs 82 85 }; … … 86 89 var realValueSymbols = new List<Symbol> { 87 90 add, sub, mul, div, sin, cos, tan, tanh, exp, log, aq, abs, square, cube, sqrt, cbrt, 88 variableSymbol, constant, 91 variableSymbol, constant, number 89 92 }; 90 93 -
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
r17413 r18093 105 105 var derivative = new Derivative(); 106 106 107 var constant = new Constant();107 var constant = new Num(); 108 108 constant.MinValue = -20; 109 109 constant.MaxValue = 20; 110 var number = new RealConstant(); 111 number.MinValue = -20; 112 number.MaxValue = 20; 110 113 var variableSymbol = new Variable(); 111 114 var binFactorVariable = new BinaryFactorVariable(); … … 121 124 var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, 122 125 fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient}); 123 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable });126 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, number, variableSymbol, binFactorVariable, factorVariable }); 124 127 var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols }); 125 128
Note: See TracChangeset
for help on using the changeset viewer.