Changeset 16531 for branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
- Timestamp:
- 01/14/19 16:41:37 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2866_SymRegHyperbolicFunctions/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
r16360 r16531 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, … … 261 263 if (node.Symbol is Tangent) { 262 264 return tan( 265 ConvertToAutoDiff(node.GetSubtree(0))); 266 } 267 if (node.Symbol is HyperbolicTangent) { 268 return tanh( 263 269 ConvertToAutoDiff(node.GetSubtree(0))); 264 270 } … … 321 327 !(n.Symbol is Cosine) && 322 328 !(n.Symbol is Tangent) && 329 !(n.Symbol is HyperbolicTangent) && 323 330 !(n.Symbol is Erf) && 324 331 !(n.Symbol is Norm) &&
Note: See TracChangeset
for help on using the changeset viewer.