Changeset 18130
- Timestamp:
- 12/15/21 11:36:06 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/DerivativeCalculator.cs
r18114 r18130 156 156 var newPower = (ISymbolicExpressionTreeNode)branch.Clone(); 157 157 var f = (ISymbolicExpressionTreeNode)newPower.GetSubtree(0).Clone(); 158 var newExponent = (INumericTreeNode)n ewPower.GetSubtree(1);159 newExponent.Value -=1;158 var newExponent = (INumericTreeNode)numberSy.CreateTreeNode(); 159 newExponent.Value = ((INumericTreeNode)newPower.GetSubtree(1)).Value - 1; 160 160 return Product(Product(CreateNumber(exponent.Value), newPower), Derive(f, variableName)); 161 161 } else throw new NotSupportedException("Cannot derive non-integer powers");
Note: See TracChangeset
for help on using the changeset viewer.