You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Nigel Goodwin (JIRA)" <ji...@apache.org> on 2014/07/11 13:55:04 UTC

[jira] [Comment Edited] (MATH-1137) BOBYQA incorrect indexing

    [ 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:54 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

  double curv = modelSecondDerivativesValues.getEntry((j + j * j) / 2);

but I think it should be

  double curv = modelSecondDerivativesValues.getEntry((j + 1 +  (j+1)*(j+1)) / 2-1);

The original Fortran is

              CURV=HQ((J+J*J)/2)

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)