Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/20/18 17:40:11 (7 years ago)
Author:
lkammere
Message:

#2886: Remove cosine terminal symbols.

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  
    3838    public TerminalSymbol Exp;
    3939    public TerminalSymbol Sin;
    40     public TerminalSymbol Cos;
    4140    public TerminalSymbol Inv;
    4241
     
    5655    private ISymbol divSy;
    5756    private ISymbol sinSy;
    58     private ISymbol cosSy;
    5957
    6058    private ISymbol rootSy;
     
    8684      Exp = new TerminalSymbol("exp");
    8785      Sin = new TerminalSymbol("sin");
    88       Cos = new TerminalSymbol("cos");
    8986      Inv = new TerminalSymbol("inv");
    9087
     
    158155      divSy = symbolicExpressionGrammar.Symbols.OfType<Division>().First();
    159156      sinSy = symbolicExpressionGrammar.Symbols.OfType<Sine>().First();
    160       cosSy = symbolicExpressionGrammar.Symbols.OfType<Cosine>().First();
    161157
    162158      rootSy = symbolicExpressionGrammar.Symbols.OfType<ProgramRootSymbol>().First();
     
    228224        parsedSubTree.AddSubtree(ParseSymbolicExpressionTree(parseStack));
    229225
    230       } else if (currentSymbol == Cos) {
    231         parsedSubTree = cosSy.CreateTreeNode();
    232         parsedSubTree.AddSubtree(ParseSymbolicExpressionTree(parseStack));
    233 
    234226      } else if (currentSymbol == Inv) {
    235227        parsedSubTree = divSy.CreateTreeNode();
  • branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/Hashing/Hasher.cs

    r15849 r15851  
    3838      // LOG, EXP, SIN, INV
    3939      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) {
    4241        // Directly aggregate the single subtree
    4342        return new[] { AggregateHashes(parseStack.Peek(), GetSubtreeHashes(parseStack)) };
Note: See TracChangeset for help on using the changeset viewer.