You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2011/04/04 22:05:05 UTC
[jira] [Created] (MATH-556) CMAESOptimizer constructor should copy
rather than reference input arrays
CMAESOptimizer constructor should copy rather than reference input arrays
-------------------------------------------------------------------------
Key: MATH-556
URL: https://issues.apache.org/jira/browse/MATH-556
Project: Commons Math
Issue Type: Bug
Affects Versions: Nightly Builds
Reporter: Phil Steitz
Priority: Minor
Fix For: 3.0
The CMAESOptimizer constructors take array arguments but do not copy the input arrays. The current implementation does not write to the input arrays, but client code could, making the API contract ambiguous. This practice should in general be avoided unless the arrays are meant to be in/out parameters or they are expected to be very large. Neither of these conditions appear to hold in CMAESOptimizer, so the constructors should be modified to copy the input arrays.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (MATH-556) CMAESOptimizer constructor should copy
rather than reference input arrays
Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Steitz resolved MATH-556.
------------------------------
Resolution: Fixed
Fixed in r1088895.
> CMAESOptimizer constructor should copy rather than reference input arrays
> -------------------------------------------------------------------------
>
> Key: MATH-556
> URL: https://issues.apache.org/jira/browse/MATH-556
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Reporter: Phil Steitz
> Priority: Minor
> Fix For: 3.0
>
>
> The CMAESOptimizer constructors take array arguments but do not copy the input arrays. The current implementation does not write to the input arrays, but client code could, making the API contract ambiguous. This practice should in general be avoided unless the arrays are meant to be in/out parameters or they are expected to be very large. Neither of these conditions appear to hold in CMAESOptimizer, so the constructors should be modified to copy the input arrays.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira