Changeset 18115 for branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars
- Timestamp:
- 12/13/21 17:49:34 (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
r18114 r18115 52 52 number.MinValue = -20; 53 53 number.MaxValue = 20; 54 var variableSymbol = new Variable(); 54 var constant = new Constant(); 55 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 55 56 var binFactorVariableSymbol = new BinaryFactorVariable(); 56 57 var factorVariableSymbol = new FactorVariable(); 57 58 58 var allSymbols = new List<Symbol>() { add, sub, mul, div, number, variableSymbol, binFactorVariableSymbol, factorVariableSymbol };59 var allSymbols = new List<Symbol>() { add, sub, mul, div, number, constant, variableSymbol, binFactorVariableSymbol, factorVariableSymbol }; 59 60 var functionSymbols = new List<Symbol>() { add, sub, mul, div }; 60 61 … … 66 67 } 67 68 SetSubtreeCount(number, 0, 0); 69 SetSubtreeCount(constant, 0, 0); 68 70 SetSubtreeCount(variableSymbol, 0, 0); 69 71 SetSubtreeCount(binFactorVariableSymbol, 0, 0); -
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
r18114 r18115 121 121 number.MinValue = -20; 122 122 number.MaxValue = 20; 123 var variableSymbol = new Variable();123 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 124 124 var binFactorVariable = new BinaryFactorVariable(); 125 125 var factorVariable = new FactorVariable(); … … 130 130 autoregressiveVariable.Enabled = false; 131 131 132 var constant = new Constant(); 133 132 134 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 135 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, number, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };136 @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, number, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition }; 135 137 var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, tanh, not, timeLag, integral, derivative, 136 138 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral … … 139 141 var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition }; 140 142 var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor }; 141 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, number, laggedVariable, autoregressiveVariable };143 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, number, constant, laggedVariable, autoregressiveVariable }; 142 144 143 145 foreach (var symb in allSymbols) -
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs
r18114 r18115 69 69 number.MinValue = -20; 70 70 number.MaxValue = 20; 71 var constant = new Constant(); 71 72 var variableSymbol = new Variable(); 72 73 … … 78 79 //all other symbols 79 80 var allSymbols = new List<Symbol> { 80 add, sub, mul, div, number, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp,81 add, sub, mul, div, number, constant, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp, 81 82 tanh, aq, abs 82 83 }; … … 86 87 var realValueSymbols = new List<Symbol> { 87 88 add, sub, mul, div, sin, cos, tan, tanh, exp, log, aq, abs, square, cube, sqrt, cbrt, 88 variableSymbol, number 89 variableSymbol, number, constant 89 90 }; 90 91 -
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
r18114 r18115 108 108 number.MinValue = -20; 109 109 number.MaxValue = 20; 110 var constant = new Constant(); 110 111 var variableSymbol = new Variable(); 111 112 var binFactorVariable = new BinaryFactorVariable(); … … 121 122 var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, 122 123 fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient}); 123 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { number, variableSymbol, binFactorVariable, factorVariable });124 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { number, constant, variableSymbol, binFactorVariable, factorVariable }); 124 125 var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols }); 125 126
Note: See TracChangeset
for help on using the changeset viewer.