[
https://issues.apache.org/jira/browse/MATH-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14521411#comment-14521411
]
Alexander Nozik commented on MATH-1143:
---------------------------------------
I am not sure I understand, how this constructor works. It seems that it
defines derivatives in the fixed point. How can I define a function for which I
know value and first derivative in any given point? Something like that?
{code}
UnivariateFunction f = (DerivativeStructure ds) -> {
double val = someOerationHere(ds.value);
double deriv = someDerivativeCalculationHere(ds.value)
return new DerivativeStructure(1, 1, val, deriv);
};
{code}
Anyway, it seems a bit complicated construct. I think it would be better to
create some kind of helper class (say DifferentiableFuncitonBuilder), in which
on could set function and its derivatives separately. Later one can add some
pretty fancy functionality like building function from String representation.
> Helper methods to FiniteDifferencesDifferentiator
> -------------------------------------------------
>
> Key: MATH-1143
> URL: https://issues.apache.org/jira/browse/MATH-1143
> Project: Commons Math
> Issue Type: Improvement
> Reporter: Alexander Nozik
> Priority: Trivial
>
> A DerivativeStructure and UnivariateDifferentiableFunction are great tools if
> one needs to investigate the whole function but are not convenient if one
> just needs derivative in a given point.
> Perhaps you could add some helper methods to FiniteDifferencesDifferentiator
> or to utility class like FunctionUtils. Also it would be good to have helper
> methods to get the derivatives of UnivariateDifferentiableFunction or
> MultivariateDifferentiableFunction as simple Univariate or Multivariate
> functions (or vector-functions).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)