On 7/24/06, Ivan Liu <[EMAIL PROTECTED]> wrote:
I'd like to ask some c++ experts about how to write the equivalent
of type gsl_function using C++ convenctions, which takes
arbitrary parameter list that can be defined localy.
In an object-oriented design, the API for the multi-dimensional root
finding and minimization packages is simplified somewhat. You don't
need to pass around an explicit void pointer for constant parameters,
since that role is taken over by the "this" pointer. Instead of
gsl_function, I would use an interface
interface Function
{
double f(double x);
}
in Java, or the equivalent abstract base class in C++. It is then up
any concrete implementation of Function to deal with additional
parameters.
Regards,
-- mj
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl