* Re: ref
[not found] ` <3BB22690.D6794FA1@lanl.gov>
@ 2001-12-19 13:20 ` Brian Gough
0 siblings, 0 replies; only message in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
To: Varghese John; +Cc: gsl-discuss
Gerard Jungman writes:
> Varghese John wrote:
> >
> > Suppose that I am minimising a function and the
> > minimum lies on one of the boundaries, the minimiser throws an "minimum
> > outside interval" error.
> >
> > Can you give me a simple example where I can trap that error
> > (say x*x and interval [-1,0]).
> > so that I can check status and proceed with out crashing.
>
You'll want to turn off the error handler at the start of the program
(or replace it with your own non-exiting error handler) and check the
return value from gsl_min_fminimizer_set().
gsl_set_error_handler_off();
...
status = gsl_min_fminimizer_set (f,....);
if (status != GSL_SUCCESS)
{
/* interval does not bound minimum reliably */
}
regards
Brian Gough
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-12-19 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <F47a7kCurcYNnf6ycBr000086a2@hotmail.com>
[not found] ` <3BB22690.D6794FA1@lanl.gov>
2001-12-19 13:20 ` ref Brian Gough
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).