Changeset 17246 for branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs
- Timestamp:
- 09/11/19 14:06:25 (5 years ago)
- Location:
- branches/2925_AutoDiffForDynamicalModels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/branches/2435-alglib_3_15/HeuristicLab.Problems.DataAnalysis.Symbolic (added) merged: 17034 /trunk/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 17037,17076-17077,17125,17132,17180,17184
- Property svn:mergeinfo changed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs
r16988 r17246 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 179 179 var u = (ISymbolicExpressionTreeNode)branch.GetSubtree(0).Clone(); 180 180 return Div(fxp, Square(Cosine(u))); 181 } 182 if (branch.Symbol is HyperbolicTangent) { 183 // tanh(f(x))' = f(x)'sech²(f(x)) = f(x)'(1 - tanh²(f(x))) 184 var fxp = Derive(branch.GetSubtree(0), variableName); 185 var tanh = (ISymbolicExpressionTreeNode)branch.Clone(); 186 return Product(fxp, Subtract(CreateConstant(1.0), Square(tanh))); 181 187 } 182 188 throw new NotSupportedException(string.Format("Symbol {0} is not supported.", branch.Symbol));
Note: See TracChangeset
for help on using the changeset viewer.