Changeset 15851 for branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration
- Timestamp:
- 03/20/18 17:40:11 (7 years ago)
- Location:
- branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration/Grammar.cs
r15850 r15851 38 38 public TerminalSymbol Exp; 39 39 public TerminalSymbol Sin; 40 public TerminalSymbol Cos;41 40 public TerminalSymbol Inv; 42 41 … … 56 55 private ISymbol divSy; 57 56 private ISymbol sinSy; 58 private ISymbol cosSy;59 57 60 58 private ISymbol rootSy; … … 86 84 Exp = new TerminalSymbol("exp"); 87 85 Sin = new TerminalSymbol("sin"); 88 Cos = new TerminalSymbol("cos");89 86 Inv = new TerminalSymbol("inv"); 90 87 … … 158 155 divSy = symbolicExpressionGrammar.Symbols.OfType<Division>().First(); 159 156 sinSy = symbolicExpressionGrammar.Symbols.OfType<Sine>().First(); 160 cosSy = symbolicExpressionGrammar.Symbols.OfType<Cosine>().First();161 157 162 158 rootSy = symbolicExpressionGrammar.Symbols.OfType<ProgramRootSymbol>().First(); … … 228 224 parsedSubTree.AddSubtree(ParseSymbolicExpressionTree(parseStack)); 229 225 230 } else if (currentSymbol == Cos) {231 parsedSubTree = cosSy.CreateTreeNode();232 parsedSubTree.AddSubtree(ParseSymbolicExpressionTree(parseStack));233 234 226 } else if (currentSymbol == Inv) { 235 227 parsedSubTree = divSy.CreateTreeNode(); -
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Hashing/Hasher.cs
r15849 r15851 38 38 // LOG, EXP, SIN, INV 39 39 if (currentSymbol == Grammar.Log || currentSymbol == Grammar.Exp || 40 currentSymbol == Grammar.Sin || currentSymbol == Grammar.Cos || 41 currentSymbol == Grammar.Inv) { 40 currentSymbol == Grammar.Sin || currentSymbol == Grammar.Inv) { 42 41 // Directly aggregate the single subtree 43 42 return new[] { AggregateHashes(parseStack.Peek(), GetSubtreeHashes(parseStack)) };
Note: See TracChangeset
for help on using the changeset viewer.