Changeset 16238 for branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars
- Timestamp:
- 10/18/18 15:29:59 (6 years ago)
- Location:
- branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
r16236 r16238 59 59 var square = new Square(); 60 60 square.InitialFrequency = 0.0; 61 var cube = new Cube(); 62 cube.InitialFrequency = 0.0; 61 63 var root = new Root(); 62 64 root.InitialFrequency = 0.0; 63 65 var sqrt = new SquareRoot(); 64 66 sqrt.InitialFrequency = 0.0; 67 var cubeRoot = new CubeRoot(); 68 cubeRoot.InitialFrequency = 0.0; 65 69 var airyA = new AiryA(); 66 70 airyA.InitialFrequency = 0.0; … … 125 129 autoregressiveVariable.Enabled = false; 126 130 127 var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, pow, sqrt, root, exp,131 var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, 128 132 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral, 129 133 @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition }; 130 var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, sin, cos, tan, log, exp, not, timeLag, integral, derivative,134 var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, not, timeLag, integral, derivative, 131 135 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral 132 136 }; -
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
r15944 r16238 69 69 var root = new Root(); 70 70 var sqrt = new SquareRoot(); 71 var cube = new Cube(); 72 var cubeRoot = new CubeRoot(); 71 73 var exp = new Exponential(); 72 74 var abs = new Absolute(); … … 87 89 var psi = new Psi(); 88 90 var sineIntegral = new SineIntegral(); 91 var analyticalQuotient = new AnalyticalQuotient(); 89 92 90 93 var @if = new IfThenElse(); … … 112 115 113 116 #region group symbol declaration 114 var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div, mean , abs});117 var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div, mean }); 115 118 var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan }); 116 119 var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log }); 117 var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { a iryA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,118 fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral });120 var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, 121 fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient}); 119 122 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable }); 120 123 var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols }); 121 124 122 var powerSymbols = new GroupSymbol(PowerFunctionsName, new List<ISymbol> { square, pow, sqrt, root });125 var powerSymbols = new GroupSymbol(PowerFunctionsName, new List<ISymbol> { square, pow, sqrt, root, cube, cubeRoot }); 123 126 124 127 var conditionSymbols = new GroupSymbol(ConditionsName, new List<ISymbol> { @if, variableCondition }); … … 141 144 SetSubtreeCount(root, 2, 2); 142 145 SetSubtreeCount(square, 1, 1); 146 SetSubtreeCount(cube, 1, 1); 143 147 SetSubtreeCount(sqrt, 1, 1); 148 SetSubtreeCount(cubeRoot, 1, 1); 144 149 SetSubtreeCount(exponentialAndLogarithmicSymbols, 1, 1); 145 SetSubtreeCount(specialFunctions, 1, 1); 150 foreach(var sy in specialFunctions.Symbols.Except(new[] { analyticalQuotient})) { 151 SetSubtreeCount(sy, 1, 1); 152 } 153 SetSubtreeCount(analyticalQuotient, 2, 2); 154 146 155 SetSubtreeCount(terminalSymbols, 0, 0); 147 156
Note: See TracChangeset
for help on using the changeset viewer.