Changeset 16676 for branches/2974_Constants_Optimization/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
- Timestamp:
- 03/13/19 09:30:18 (5 years ago)
- Location:
- branches/2974_Constants_Optimization/HeuristicLab.Problems.DataAnalysis.Symbolic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2974_Constants_Optimization/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/2974_Constants_Optimization/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
r16508 r16676 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 8Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 76 76 eval: Math.Tan, 77 77 diff: x => 1 + Math.Tan(x) * Math.Tan(x)); 78 78 private static readonly Func<Term, UnaryFunc> tanh = UnaryFunc.Factory( 79 eval: Math.Tanh, 80 diff: x => 1 - Math.Tanh(x) * Math.Tanh(x)); 79 81 private static readonly Func<Term, UnaryFunc> erf = UnaryFunc.Factory( 80 82 eval: alglib.errorfunction, … … 260 262 if (node.Symbol is Tangent) { 261 263 return tan( 264 ConvertToAutoDiff(node.GetSubtree(0))); 265 } 266 if (node.Symbol is HyperbolicTangent) { 267 return tanh( 262 268 ConvertToAutoDiff(node.GetSubtree(0))); 263 269 } … … 320 326 !(n.Symbol is Cosine) && 321 327 !(n.Symbol is Tangent) && 328 !(n.Symbol is HyperbolicTangent) && 322 329 !(n.Symbol is Erf) && 323 330 !(n.Symbol is Norm) &&
Note: See TracChangeset
for help on using the changeset viewer.