Changeset 17752
- Timestamp:
- 09/21/20 16:03:05 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentVectorExpressionGrammar.cs
r17604 r17752 49 49 private const string VectorSymbolsName = "Vector Symbols"; 50 50 51 private const string VectorManipulationSymbolsName = "Vector Manipulation Symbols"; 52 51 53 private const string RealValuedSymbolsName = "Real Valued Symbols"; 52 54 … … 124 126 #endregion 125 127 128 #region vector manipulation symbol declaration 129 var subvector = new SubVector() { EnableWindowing = true }; 130 #endregion 131 126 132 #region group symbol declaration 127 133 var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div }); … … 142 148 var vectorSymbols = new GroupSymbol(VectorSymbolsName, new List<ISymbol>() { vectorarithmeticSymbols, vectortrigonometricSymbols, vectorexponentialAndLogarithmicSymbols, vectorpowerSymbols, vectorterminalSymbols }); 143 149 150 var vectorManipulationSymbols = new GroupSymbol(VectorManipulationSymbolsName, new List<ISymbol>() { subvector }); 151 144 152 //var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol> { scalarSymbols, vectorSymbols }); 145 146 147 153 #endregion 148 154 … … 150 156 AddSymbol(scalarSymbols); 151 157 AddSymbol(vectorSymbols); 158 AddSymbol(vectorManipulationSymbols); 152 159 153 160 #region subtree count configuration … … 177 184 SetSubtreeCount(vectorexponentialAndLogarithmicSymbols, 1, 1); 178 185 SetSubtreeCount(vectorterminalSymbols, 0, 0); 186 187 SetSubtreeCount(subvector, 1, 1); 179 188 #endregion 180 189 … … 189 198 AddAllowedChildSymbol(root, constant, 1); 190 199 AddAllowedChildSymbol(aggregationSymbols, vectorSymbols); 200 AddAllowedChildSymbol(statisticsSymbols, subvector); 191 201 192 202 AddAllowedChildSymbol(vectorarithmeticSymbols, vectorSymbols); … … 197 207 AddAllowedChildSymbol(vectorpower, constant, 1); 198 208 AddAllowedChildSymbol(vectorroot, constant, 1); 209 210 AddAllowedChildSymbol(subvector, vectorSymbols); 199 211 #endregion 200 212 … … 202 214 var disabledByDefault = new[] { 203 215 TrigonometricFunctionsName, ExponentialFunctionsName, PowerFunctionsName, 204 VectorTrigonometricFunctionsName, VectorExponentialFunctionsName, VectorPowerFunctionsName 216 VectorTrigonometricFunctionsName, VectorExponentialFunctionsName, VectorPowerFunctionsName, 217 VectorManipulationSymbolsName 205 218 }; 206 219 foreach (var grp in Symbols.Where(sym => disabledByDefault.Contains(sym.Name)))
Note: See TracChangeset
for help on using the changeset viewer.