Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk merged: 16802,16905,17028
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 16802,16905,17028
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs
r17102 r17103 143 143 var f = (ISymbolicExpressionTreeNode)branch.Clone(); 144 144 var u = (ISymbolicExpressionTreeNode)branch.GetSubtree(0).Clone(); 145 return Product(Div(CreateConstant(1.0), Product(CreateConstant(3.0), Square(f))), Derive(u, variableName)); 145 return Product(Div(CreateConstant(1.0), Product(CreateConstant(3.0), Square(f))), Derive(u, variableName)); // 1/3 1/cbrt(f(x))^2 d/dx f(x) 146 146 } 147 147 if (branch.Symbol is Cube) { -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToAutoDiffTermConverter.cs
r17101 r17103 92 92 ); 93 93 94 private static readonly Func<Term, UnaryFunc> cbrt = UnaryFunc.Factory( 95 eval: x => x < 0 ? -Math.Pow(-x, 1.0 / 3) : Math.Pow(x, 1.0 / 3), 96 diff: x => { var cbrt_x = x < 0 ? -Math.Pow(-x, 1.0 / 3) : Math.Pow(x, 1.0 / 3); return 1.0 / (3 * cbrt_x * cbrt_x); } 97 ); 98 99 100 94 101 #endregion 95 102 … … 250 257 } 251 258 if (node.Symbol is CubeRoot) { 252 return AutoDiff.TermBuilder.Power( 253 ConvertToAutoDiff(node.GetSubtree(0)), 1.0/3.0); 259 return cbrt(ConvertToAutoDiff(node.GetSubtree(0))); 254 260 } 255 261 if (node.Symbol is Sine) {
Note: See TracChangeset
for help on using the changeset viewer.