You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (JIRA)" <ji...@apache.org> on 2018/02/17 15:04:02 UTC

[jira] [Commented] (MATH-1452) Named parameters for DerivativeStructure

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

Gilles commented on MATH-1452:
------------------------------

Hi Alexander.

This looks like an interesting feature.
I've always found the API too low level, but I've never had the opportunity to use it, and dive into the design even less so; I seem to recall that there were performance issues that may have dictated the way it is implemented.

Please read my general comment about Commons Math in report MATH-1451; the same applies here.  Please post to the "dev" ML if your are willing to lead the refactoring of this functionality. Thanks.

> Named parameters for DerivativeStructure
> ----------------------------------------
>
>                 Key: MATH-1452
>                 URL: https://issues.apache.org/jira/browse/MATH-1452
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 4.0
>            Reporter: Alexander Nozik
>            Priority: Major
>
> Consider following situation: we have `DerivativeStructure` `struct1` which depends on parameter `a` and parameter `b` and  `DerivativeStructure` `struct2` which depends on parameter `b` and parameter `c`, we want to calculate `struct3 = struct1 + struct2`. The problem is since the parameters are accessible only by number and from implementation it seems that those numbers start with 0, the only way to do so is to define three parameters for both `struct1` and `struct2` and set appropriate derivatives to zero.
>  
> The obvious solution is to replace number reference in derivatives by string key reference. In this case `DerivativeStructure` can automatically return zero for derivatives on parameters it does not have.
> This solution does not require any changes to internal workings of `DerivativeStructure` or `DSCompiler`, it could could be implemented without breaking backward compatibility. The derivative structure could still be accessible by number, but in case there is a binary operation, it should check name lists and correctly interconnect the structures.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)