Changeset 16722 for branches/2988_ModelsOfModels2/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars
- Timestamp:
- 03/28/19 11:22:24 (6 years ago)
- Location:
- branches/2988_ModelsOfModels2
- Files:
-
- 1 added
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2988_ModelsOfModels2/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/2988_ModelsOfModels2/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs
r16565 r16722 55 55 var log = new Logarithm(); 56 56 var abs = new Absolute(); 57 var tanh = new HyperbolicTangent(); 57 58 var pow = new Power(); 58 59 pow.InitialFrequency = 0.0; … … 120 121 constant.MinValue = -20; 121 122 constant.MaxValue = 20; 123 124 var treeModel = new TreeModel(); 125 122 126 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable(); 123 127 var binFactorVariable = new BinaryFactorVariable(); … … 129 133 autoregressiveVariable.Enabled = false; 130 134 131 var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, 135 var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, tanh, 132 136 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral, 133 137 @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition }; 134 var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, not, timeLag, integral, derivative,138 var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, tanh, not, timeLag, integral, derivative, 135 139 airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral 136 140 }; … … 138 142 var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition }; 139 143 var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor }; 140 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable };144 var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable, treeModel }; 141 145 142 146 foreach (var symb in allSymbols) -
branches/2988_ModelsOfModels2/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs
r16565 r16722 85 85 var gamma = new Gamma(); 86 86 var hypCosineIntegral = new HyperbolicCosineIntegral(); 87 var tanh = new HyperbolicTangent(); 87 88 var hypSineIntegral = new HyperbolicSineIntegral(); 88 89 var norm = new Norm(); … … 107 108 constant.MinValue = -20; 108 109 constant.MaxValue = 20; 110 109 111 var variableSymbol = new Variable(); 110 112 var binFactorVariable = new BinaryFactorVariable(); … … 112 114 var laggedVariable = new LaggedVariable(); 113 115 var autoregressiveVariable = new AutoregressiveTargetVariable(); 116 117 var treeModel = new TreeModel(); 114 118 #endregion 115 119 116 120 #region group symbol declaration 117 121 var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div, mean }); 118 var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan 119 var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log 122 var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan, tanh}); 123 var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log}); 120 124 var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, 121 125 fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient}); 122 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable });126 var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable, treeModel }); 123 127 var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols }); 124 128 … … 242 246 Symbols.First(s => s is Average).Enabled = false; 243 247 Symbols.First(s => s is Absolute).Enabled = false; 248 Symbols.First(s => s is HyperbolicTangent).Enabled = false; 244 249 Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false; 245 250 Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false; … … 254 259 Symbols.First(s => s is Xor).Enabled = false; 255 260 Symbols.First(s => s is Absolute).Enabled = false; 261 Symbols.First(s => s is HyperbolicTangent).Enabled = false; 256 262 Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false; 257 263 Symbols.First(s => s.Name == ExponentialFunctionsName).Enabled = false; … … 264 270 Symbols.First(s => s is Average).Enabled = false; 265 271 Symbols.First(s => s is Absolute).Enabled = false; 272 Symbols.First(s => s is HyperbolicTangent).Enabled = false; 266 273 Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false; 267 274 Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
Note: See TracChangeset
for help on using the changeset viewer.