You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alexander Nozik (JIRA)" <ji...@apache.org> on 2018/02/17 12:13:00 UTC
[jira] [Created] (MATH-1452) Named parameters for
DerivativeStructure
Alexander Nozik created MATH-1452:
-------------------------------------
Summary: 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
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)