* Multidimensional minimization in c++
@ 2001-12-19 13:20 Tom Mortimer-Jones
2001-12-19 13:20 ` Brian Gough
0 siblings, 1 reply; 2+ messages in thread
From: Tom Mortimer-Jones @ 2001-12-19 13:20 UTC (permalink / raw)
To: gsl-discuss
Has anyone used the multidimensional minimization routines in gsl within
a c++ class?
I would like to include minimization within a class, acting on data
contained within the class, but the gsl_multimin_function_fdf requires
function (method) addresses which have to be static and static methods
cannot work on the non static data within my class instances. Has anyone
found a way to work around this problem or am I doing something wrong?
Thanks for your time,
Tom.
--
Tom Mortimer-Jones,
School of Chemical Sciences,
University of Birmingham.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Multidimensional minimization in c++
2001-12-19 13:20 Multidimensional minimization in c++ Tom Mortimer-Jones
@ 2001-12-19 13:20 ` Brian Gough
0 siblings, 0 replies; 2+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
To: Tom Mortimer-Jones; +Cc: gsl-discuss
Tom Mortimer-Jones writes:
> Has anyone used the multidimensional minimization routines in gsl within
> a c++ class?
>
> I would like to include minimization within a class, acting on data
> contained within the class, but the gsl_multimin_function_fdf requires
> function (method) addresses which have to be static and static methods
> cannot work on the non static data within my class instances. Has anyone
> found a way to work around this problem or am I doing something wrong?
I don't know if there's any special way to handle this elegantly in
C++ generally but with GSL you can always use the void * params
argument of gsl_multimin_function_fdf to pass the necessary
information (e.g. a pointer to self).
regards
Brian Gough
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-12-19 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 Multidimensional minimization in c++ Tom Mortimer-Jones
2001-12-19 13:20 ` 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).