let nmsimplex handle non-finite function values properly
Alxneit-Kamber Ivo
ivo.alxneit@psi.ch
Wed Apr 25 09:23:00 GMT 2007
hi all
finally, i managed to teach 'gsl_fminimizer_nmsimplex' how to handle
non-finite function values (finite.patch). sorry, it took far too long
(since the original post of march 9th this year).
the logic behind the patch is that we can generally treat non-finite
function values (POSINF, NEGINF, NAN) as "no improvment reached" in
'gsl_fminimizer_iterate()'. only when we contract the whole simplex
with respect to its lowest point we have to abort in case we encounter
non-finite function values. the same is true in 'gsl_fminimizer_set()'.
this ensures that the simplex never contains non-finite values.
this also allows to cleanly handle any failures of the user supplied
function: the function should return a non-finite value (e.g. 'NAN')
in such a case. this should probably be documented.
also included are two minor clean ups.
leak_plug.patch: plugs memory leak if 'gsl_fminimizer_alloc()' fails.
dim_test.patch: checks for a correct number of parameters in
'gsl_fminimizer_alloc()' and for the correct sizes of the various vector
arguments passed around.
--
Dr. Ivo Alxneit
Laboratory for Solar Technology phone: +41 56 310 4092
Paul Scherrer Institute fax: +41 56 310 2688
CH-5232 Villigen http://solar.web.psi.ch
Switzerland gnupg key: 0x515E30C7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dim_test.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20070425/6deab31a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: finite.patch
Type: text/x-patch
Size: 3280 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20070425/6deab31a/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: leak_plug.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20070425/6deab31a/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20070425/6deab31a/attachment.sig>
More information about the Gsl-discuss
mailing list