commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1143) Helper methods to FiniteDifferencesDifferentiator
Date Wed, 29 Apr 2015 20:15:07 GMT

    [ https://issues.apache.org/jira/browse/MATH-1143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520131#comment-14520131
] 

Thomas Neidhart commented on MATH-1143:
---------------------------------------

Examples:

evaluation
{code}
    public static double derivative(UnivariateDifferentiableFunction f, double x, int order)
{
        DerivativeStructure ds = f.value(new DerivativeStructure(1, order, 0, x));
        return ds.getPartialDerivative(order);
    }
{code}

derivative function
{code}
    public static UnivariateFunction derivative(final UnivariateDifferentiableFunction f,
final int order) {
        return new UnivariateFunction() {

            @Override
            public double value(double x) {
                DerivativeStructure ds = f.value(new DerivativeStructure(1, order, 0, x));
                return ds.getPartialDerivative(order);
            }

        };
    }
{code}

> 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)

Mime
View raw message