Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/12/18 16:11:30 (6 years ago)
Author:
msemenki
Message:

#2866: Add support for hyperbolic tangent symbol.

Location:
branches/2866_SymRegHyperbolicFunctions
Files:
1 added
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs

    r16360 r16375  
    5555      var log = new Logarithm();
    5656      var abs = new Absolute();
     57      var tanh = new HyperbolicTangent();
    5758      var pow = new Power();
    5859      pow.InitialFrequency = 0.0;
     
    129130      autoregressiveVariable.Enabled = false;
    130131
    131       var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp,
     132      var allSymbols = new List<Symbol>() { add, sub, mul, div, aq, mean, abs, sin, cos, tan, log, square, cube, pow, sqrt, cubeRoot, root, exp, tanh,
    132133        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
    133134        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
    134       var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
     135      var unaryFunctionSymbols = new List<Symbol>() { abs, square, sqrt, cube, cubeRoot, sin, cos, tan, log, exp, tanh, not, timeLag, integral, derivative,
    135136        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
    136137      };
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r16360 r16375  
    8585      var gamma = new Gamma();
    8686      var hypCosineIntegral = new HyperbolicCosineIntegral();
     87      var tanh = new HyperbolicTangent();
    8788      var hypSineIntegral = new HyperbolicSineIntegral();
    8889      var norm = new Norm();
     
    116117      #region group symbol declaration
    117118      var arithmeticSymbols = new GroupSymbol(ArithmeticFunctionsName, new List<ISymbol>() { add, sub, mul, div, mean });
    118       var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan });
    119       var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log });
     119      var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan, tanh});
     120      var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log});
    120121      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { abs, airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
    121122        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, analyticalQuotient});
     
    242243      Symbols.First(s => s is Average).Enabled = false;
    243244      Symbols.First(s => s is Absolute).Enabled = false;
     245      Symbols.First(s => s is HyperbolicTangent).Enabled = false;
    244246      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    245247      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
     
    254256      Symbols.First(s => s is Xor).Enabled = false;
    255257      Symbols.First(s => s is Absolute).Enabled = false;
     258      Symbols.First(s => s is HyperbolicTangent).Enabled = false;
    256259      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    257260      Symbols.First(s => s.Name == ExponentialFunctionsName).Enabled = false;
     
    264267      Symbols.First(s => s is Average).Enabled = false;
    265268      Symbols.First(s => s is Absolute).Enabled = false;
     269      Symbols.First(s => s is HyperbolicTangent).Enabled = false;
    266270      Symbols.First(s => s.Name == TrigonometricFunctionsName).Enabled = false;
    267271      Symbols.First(s => s.Name == PowerFunctionsName).Enabled = false;
Note: See TracChangeset for help on using the changeset viewer.