bugGNU Scientific Library - Bugs: bug #23192, Nelder Mead bug in finding second...


You are not allowed to post comments on this tracker with your current authentication level.

bug #23192: Nelder Mead bug in finding second highest point

Submitter:  -Deleted Account- <bjg>
Submitted:  Tue 06 May 2008 08:57:01 PM UTC
Category:  Runtime error Severity:  3 - Normal
Operating System:  Status:  Fixed
Assigned to:  bjg Open/Closed:  Closed
Release:  1.11

Tue 06 May 2008 09:01:49 PM UTC, comment #1: 

fixed by 84ab11b5350babde3e57576a98f5c14a4d1278fd

-Deleted Account- <bjg>
Tue 06 May 2008 08:57:01 PM UTC, original submission:  

From: "Michael Kuklik" <mkuklik@gmail.com>
To: -email is unavailable-
Subject: [Bug-gsl] Nelder Mead bug
Date: Sun, 4 May 2008 21:23:27 -0400

Hi everyone,

Nelder Mead , i.e. simplex search has a bug. In the function
static int
nmsimplex_iterate (void vstate, gsl_multimin_function f,
                   gsl_vector * x, double size, double fval)

in multimin/simplex.c
a piece of code that determines the highest , second highest and lowest
vertex fails when first value in y1 is the highest.
It returns second highest equal to the highest. Later that influence
decision in the algorithm.

add lines:
  ds_hi = gsl_vector_get (y1, 1);
  s_hi = 1;
before the loop


 if (xc->size != x->size)
      GSL_ERROR("incompatible size of x", GSL_EINVAL);

  /* get index of highest, second highest and lowest point */

  dhi = ds_hi = dlo = gsl_vector_get (y1, 0);
  ds_hi = gsl_vector_get (y1, 1);
  s_hi = 1;
  for (i = 1; i < n; i++)
      val = (gsl_vector_get (y1, i));
      if (val < dlo)
          dlo = val;
          lo = i;


Michal Kuklik
Bug-gsl mailing list
-email is unavailable-

-Deleted Account- <bjg>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty




Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2008-05-06 bjg StatusConfirmed Fixed
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.10