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 2010/04/14 02:29:51 UTC

[jira] Closed: (MATH-289) SimplexTableau's arrayCopy could be wrong

     [ https://issues.apache.org/jira/browse/MATH-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz closed MATH-289.
----------------------------


> SimplexTableau's arrayCopy could be wrong
> -----------------------------------------
>
>                 Key: MATH-289
>                 URL: https://issues.apache.org/jira/browse/MATH-289
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.0
>         Environment: Java 1.6.0_13 on Windows XP 32-bit 
>            Reporter: Andrea
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: SimplexTableau.patch
>
>
> The private method copyArray in file SimplexTableau at line 329 takes 3 parameters src, dest and destPos but the last one is never used/read.
> private void copyArray(final double[] src, final double[] dest, final int destPos) {
>     System.arraycopy(src, 0, dest, getNumObjectiveFunctions(), src.length); 
> }
> The behavior of this method doesn't reflect its JavaDoc description, and "misleads" createTableau at line 157 that passes 1 as destPos.
> I don't think this leads to a wrong result, but the method signature/implementation is misleading for a future reuse.
> I suggest either to remove the destPos argument or use it in the method body.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira