Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/01/21 13:40:55 (2 years ago)
Author:
chaider
Message:

#3140

  • some more refactoring
  • added possibility to set value of num nodes in infix parser
  • changed displaying style of number
File:
1 edited

Legend:

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

    r18093 r18100  
    105105      var derivative = new Derivative();
    106106
    107       var constant = new Num();
    108       constant.MinValue = -20;
    109       constant.MaxValue = 20;
    110       var number = new RealConstant();
     107      var number = new Number();
    111108      number.MinValue = -20;
    112109      number.MaxValue = 20;
     110      var constant = new Constant();
    113111      var variableSymbol = new Variable();
    114112      var binFactorVariable = new BinaryFactorVariable();
     
    124122      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
    125123        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient});
    126       var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, number, variableSymbol, binFactorVariable, factorVariable });
     124      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { number, constant, variableSymbol, binFactorVariable, factorVariable });
    127125      var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
    128126
     
    196194      AddAllowedChildSymbol(powerSymbols, laggedVariable, 0);
    197195      AddAllowedChildSymbol(powerSymbols, autoregressiveVariable, 0);
    198       AddAllowedChildSymbol(powerSymbols, constant, 1);
     196      AddAllowedChildSymbol(powerSymbols, number, 1);
    199197
    200198      AddAllowedChildSymbol(square, realValuedSymbols, 0);
Note: See TracChangeset for help on using the changeset viewer.