Free cookie consent management tool by TermsFeed Policy Generator

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

#2866: Add support for hyperbolic tangent symbol.

Location:
branches/2866_SymRegHyperbolicFunctions
Files:
2 added
8 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;
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r16361 r16375  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     2<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <PropertyGroup>
    44    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     
    4141    <DebugType>full</DebugType>
    4242    <Optimize>false</Optimize>
    43     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     43    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    4444    <DefineConstants>DEBUG;TRACE</DefineConstants>
    4545    <ErrorReport>prompt</ErrorReport>
     
    5151    <DebugType>pdbonly</DebugType>
    5252    <Optimize>true</Optimize>
    53     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     53    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    5454    <DefineConstants>TRACE</DefineConstants>
    5555    <ErrorReport>prompt</ErrorReport>
     
    6060  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    6161    <DebugSymbols>true</DebugSymbols>
    62     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     62    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    6363    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6464    <DebugType>full</DebugType>
     
    6969  </PropertyGroup>
    7070  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    71     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     71    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    7272    <DefineConstants>TRACE</DefineConstants>
    7373    <Optimize>true</Optimize>
     
    8080  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    8181    <DebugSymbols>true</DebugSymbols>
    82     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     82    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    8383    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8484    <DebugType>full</DebugType>
     
    8989  </PropertyGroup>
    9090  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    91     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     91    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    9292    <DefineConstants>TRACE</DefineConstants>
    9393    <Optimize>true</Optimize>
     
    100100  <ItemGroup>
    101101    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    102       <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath>
     102      <HintPath>..\..\..\..\trunk\bin\ALGLIB-3.7.0.dll</HintPath>
    103103      <Private>False</Private>
    104104    </Reference>
    105105    <Reference Include="AutoDiff-1.0, Version=1.0.0.14388, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    106       <HintPath>..\..\bin\AutoDiff-1.0.dll</HintPath>
     106      <HintPath>..\..\..\..\trunk\bin\AutoDiff-1.0.dll</HintPath>
     107      <Private>False</Private>
     108    </Reference>
     109    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     110      <SpecificVersion>False</SpecificVersion>
     111      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
     112      <Private>False</Private>
     113    </Reference>
     114    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     115      <SpecificVersion>False</SpecificVersion>
     116      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     117      <Private>False</Private>
     118    </Reference>
     119    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     120      <SpecificVersion>False</SpecificVersion>
     121      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common-3.3.dll</HintPath>
     122      <Private>False</Private>
     123    </Reference>
     124    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     125      <SpecificVersion>False</SpecificVersion>
     126      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     127      <Private>False</Private>
     128    </Reference>
     129    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     130      <SpecificVersion>False</SpecificVersion>
     131      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core-3.3.dll</HintPath>
     132      <Private>False</Private>
     133    </Reference>
     134    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     135      <SpecificVersion>False</SpecificVersion>
     136      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data-3.3.dll</HintPath>
     137      <Private>False</Private>
     138    </Reference>
     139    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     140      <SpecificVersion>False</SpecificVersion>
     141      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
     142      <Private>False</Private>
     143    </Reference>
     144    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     145      <SpecificVersion>False</SpecificVersion>
     146      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Operators-3.3.dll</HintPath>
     147      <Private>False</Private>
     148    </Reference>
     149    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     150      <SpecificVersion>False</SpecificVersion>
     151      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization-3.3.dll</HintPath>
     152      <Private>False</Private>
     153    </Reference>
     154    <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     155      <SpecificVersion>False</SpecificVersion>
     156      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath>
     157      <Private>False</Private>
     158    </Reference>
     159    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     160      <SpecificVersion>False</SpecificVersion>
     161      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
     162      <Private>False</Private>
     163    </Reference>
     164    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     165      <SpecificVersion>False</SpecificVersion>
     166      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     167      <Private>False</Private>
     168    </Reference>
     169    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     170      <SpecificVersion>False</SpecificVersion>
     171      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     172      <Private>False</Private>
     173    </Reference>
     174    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     175      <SpecificVersion>False</SpecificVersion>
     176      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
    107177      <Private>False</Private>
    108178    </Reference>
    109179    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.NativeInterpreter-0.1, Version=0.0.0.1, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    110180      <SpecificVersion>False</SpecificVersion>
    111       <HintPath>..\..\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.NativeInterpreter-0.1.dll</HintPath>
     181      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.NativeInterpreter-0.1.dll</HintPath>
     182      <Private>False</Private>
     183    </Reference>
     184    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     185      <SpecificVersion>False</SpecificVersion>
     186      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
     187      <Private>False</Private>
     188    </Reference>
     189    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     190      <SpecificVersion>False</SpecificVersion>
     191      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Random-3.3.dll</HintPath>
    112192      <Private>False</Private>
    113193    </Reference>
     
    229309    <Compile Include="Symbols\Absolute.cs" />
    230310    <Compile Include="Symbols\CubeRoot.cs" />
     311    <Compile Include="Symbols\HyperbolicTangent.cs" />
    231312    <Compile Include="Symbols\VariableBase.cs" />
    232313    <Compile Include="Symbols\VariableTreeNodeBase.cs" />
     
    316397    </BootstrapperPackage>
    317398  </ItemGroup>
    318   <ItemGroup>
    319     <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    320       <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>
    321       <Name>HeuristicLab.Analysis-3.3</Name>
    322       <Private>False</Private>
    323     </ProjectReference>
    324     <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
    325       <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
    326       <Name>HeuristicLab.Collections-3.3</Name>
    327       <Private>False</Private>
    328     </ProjectReference>
    329     <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
    330       <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
    331       <Name>HeuristicLab.Common.Resources-3.3</Name>
    332       <Private>False</Private>
    333     </ProjectReference>
    334     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    335       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
    336       <Name>HeuristicLab.Common-3.3</Name>
    337       <Private>False</Private>
    338     </ProjectReference>
    339     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
    340       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
    341       <Name>HeuristicLab.Core-3.3</Name>
    342       <Private>False</Private>
    343     </ProjectReference>
    344     <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    345       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
    346       <Name>HeuristicLab.Data-3.3</Name>
    347       <Private>False</Private>
    348     </ProjectReference>
    349     <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
    350       <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
    351       <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
    352       <Private>False</Private>
    353     </ProjectReference>
    354     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    355       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    356       <Name>HeuristicLab.Operators-3.3</Name>
    357       <Private>False</Private>
    358     </ProjectReference>
    359     <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">
    360       <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>
    361       <Name>HeuristicLab.Optimization.Operators-3.3</Name>
    362       <Private>False</Private>
    363     </ProjectReference>
    364     <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    365       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
    366       <Name>HeuristicLab.Optimization-3.3</Name>
    367     </ProjectReference>
    368     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    369       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    370       <Name>HeuristicLab.Parameters-3.3</Name>
    371       <Private>False</Private>
    372     </ProjectReference>
    373     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    374       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    375       <Name>HeuristicLab.Persistence-3.3</Name>
    376       <Private>False</Private>
    377     </ProjectReference>
    378     <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    379       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    380       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    381       <Private>False</Private>
    382     </ProjectReference>
    383     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
    384       <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
    385       <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
    386       <Private>False</Private>
    387     </ProjectReference>
    388     <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
    389       <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
    390       <Name>HeuristicLab.Problems.Instances-3.3</Name>
    391       <Private>False</Private>
    392     </ProjectReference>
    393     <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
    394       <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
    395       <Name>HeuristicLab.Random-3.3</Name>
    396       <Private>False</Private>
    397     </ProjectReference>
    398   </ItemGroup>
    399399  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    400400  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/InfixExpressionParser.cs

    r16360 r16375  
    111111        { "COS", new Cosine()},
    112112        { "TAN", new Tangent()},
     113        { "TANH", new HyperbolicTangent()},
    113114        { "AIRYA", new AiryA()},
    114115        { "AIRYB", new AiryB()},
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Importer/SymbolicExpressionImporter.cs

    r16360 r16375  
    5353        {"COS", new Cosine()},
    5454        {"TAN", new Tangent()},
     55        {"TANH", new HyperbolicTangent ()},
    5556        {"AIRYA", new AiryA()},
    5657        {"AIRYB", new AiryB()},
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs

    r16360 r16375  
    9090    public const byte CubeRoot = 51;
    9191
     92    public const byte Tanh = 52;
     93
    9294
    9395    private static Dictionary<Type, byte> symbolToOpcode = new Dictionary<Type, byte>() {
     
    99101      { typeof(Cosine), OpCodes.Cos },
    100102      { typeof(Tangent), OpCodes.Tan },
     103      { typeof (HyperbolicTangent), OpCodes.Tanh},
    101104      { typeof(Logarithm), OpCodes.Log },
    102105      { typeof(Exponential), OpCodes.Exp },
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs

    r16360 r16375  
    206206            return Math.Abs(Evaluate(dataset, ref row, state));
    207207          }
     208        case OpCodes.Tanh: {
     209            return Math.Tanh(Evaluate(dataset, ref row, state));
     210          }
    208211        case OpCodes.Cos: {
    209212            return Math.Cos(Evaluate(dataset, ref row, state));
  • branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs

    r16360 r16375  
    227227        } else if (instr.opCode == OpCodes.Absolute) {
    228228          instr.value = Math.Abs(code[instr.childIndex].value);
     229        } else if (instr.opCode == OpCodes.Tanh) {
     230          instr.value = Math.Tanh(code[instr.childIndex].value);
    229231        } else if (instr.opCode == OpCodes.Cos) {
    230232          instr.value = Math.Cos(code[instr.childIndex].value);
Note: See TracChangeset for help on using the changeset viewer.