Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/13/21 17:49:34 (3 years ago)
Author:
gkronber
Message:

#3140: made several more changes for the constant -> number branch

Location:
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs

    r18114 r18115  
    5252      number.MinValue = -20;
    5353      number.MaxValue = 20;
    54       var variableSymbol = new Variable();
     54      var constant = new Constant();
     55      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
    5556      var binFactorVariableSymbol = new BinaryFactorVariable();
    5657      var factorVariableSymbol = new FactorVariable();
    5758
    58       var allSymbols = new List<Symbol>() { add, sub, mul, div, number, variableSymbol, binFactorVariableSymbol, factorVariableSymbol };
     59      var allSymbols = new List<Symbol>() { add, sub, mul, div, number, constant, variableSymbol, binFactorVariableSymbol, factorVariableSymbol };
    5960      var functionSymbols = new List<Symbol>() { add, sub, mul, div };
    6061
     
    6667      }
    6768      SetSubtreeCount(number, 0, 0);
     69      SetSubtreeCount(constant, 0, 0);
    6870      SetSubtreeCount(variableSymbol, 0, 0);
    6971      SetSubtreeCount(binFactorVariableSymbol, 0, 0);
  • branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs

    r18114 r18115  
    121121      number.MinValue = -20;
    122122      number.MaxValue = 20;
    123       var variableSymbol = new Variable();
     123      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
    124124      var binFactorVariable = new BinaryFactorVariable();
    125125      var factorVariable = new FactorVariable();
     
    130130      autoregressiveVariable.Enabled = false;
    131131
     132      var constant = new Constant();
     133
    132134      var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, tanh,
    133135        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
    134         @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, number, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
     136        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, number, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
    135137      var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, tanh, not, timeLag, integral, derivative,
    136138        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
     
    139141      var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, aq, variableCondition };
    140142      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor };
    141       var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, number, laggedVariable, autoregressiveVariable };
     143      var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, number, constant, laggedVariable, autoregressiveVariable };
    142144
    143145      foreach (var symb in allSymbols)
  • branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/LinearScalingGrammar.cs

    r18114 r18115  
    6969      number.MinValue = -20;
    7070      number.MaxValue = 20;
     71      var constant = new Constant();
    7172      var variableSymbol = new Variable();
    7273
     
    7879      //all other symbols
    7980      var allSymbols = new List<Symbol> {
    80         add, sub, mul, div, number, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp,
     81        add, sub, mul, div, number, constant, variableSymbol, sin, cos, tan, log, square, sqrt, cube, cbrt, exp,
    8182        tanh, aq, abs
    8283      };
     
    8687      var realValueSymbols = new List<Symbol> {
    8788         add, sub, mul, div, sin, cos, tan, tanh, exp, log, aq, abs, square, cube, sqrt, cbrt,
    88          variableSymbol, number
     89         variableSymbol, number, constant
    8990        };
    9091
  • branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r18114 r18115  
    108108      number.MinValue = -20;
    109109      number.MaxValue = 20;
     110      var constant = new Constant();
    110111      var variableSymbol = new Variable();
    111112      var binFactorVariable = new BinaryFactorVariable();
     
    121122      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
    122123        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient});
    123       var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { number, variableSymbol, binFactorVariable, factorVariable });
     124      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { number, constant, variableSymbol, binFactorVariable, factorVariable });
    124125      var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
    125126
Note: See TracChangeset for help on using the changeset viewer.