commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nigel Goodwin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MATH-1137) BOBYQA incorrect indexing
Date Fri, 11 Jul 2014 11:57:04 GMT

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

Nigel Goodwin edited comment on MATH-1137 at 7/11/14 11:56 AM:
---------------------------------------------------------------

I don't know my way around here...

I commented in Math-621 about what I think is incorrect indexing, and it seems to still be
incorrect.

Line 530 of BOBYQA has
{code}
  double curv = modelSecondDerivativesValues.getEntry((j + j * j) / 2);
{code}
but I think it should be
{code}
  double curv = modelSecondDerivativesValues.getEntry((j + 1 +  (j+1)*(j+1)) / 2-1);
{code}
The original Fortran is
{code}
              CURV=HQ((J+J*J)/2)
{code}
So a change from 1 to 0 indexing should translate into the above.


was (Author: essence):
I don't know my way around here...

I commented in Math-621 about what I think is incorrect indexing, and it seems to still be
incorrect.

Line 530 of BOBYQA has
{code}
  double curv = modelSecondDerivativesValues.getEntry((j + j * j) / 2);
{code}
but I think it should be
[code}
  double curv = modelSecondDerivativesValues.getEntry((j + 1 +  (j+1)*(j+1)) / 2-1);
{code}
The original Fortran is
{code}
              CURV=HQ((J+J*J)/2)
{code}
So a change from 1 to 0 indexing should translate into the above.

> BOBYQA incorrect indexing
> -------------------------
>
>                 Key: MATH-1137
>                 URL: https://issues.apache.org/jira/browse/MATH-1137
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Nigel Goodwin
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message