commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MATH-556) CMAESOptimizer constructor should copy rather than reference input arrays
Date Mon, 04 Apr 2011 20:05:05 GMT
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

Mime
View raw message