M
Markus S
Hi,
I try to use a function that minimizes another function (namely from
the Boost library: brent_find_minima). When I provide the function to
be minized at the very top level (ie, in the .cpp file) and call
brent_find_minima from the main block, it works fine but when I create
a class and define the function to be minimized in there (and also call
brent_find_minima in another function in that class), I get this error
during compilation:
error: argument of type ‘double (Testclass:(double)’ does not match
‘double (Testclass::*)(double)’
I had invoked brent_find_minima with this line (which works when called
in main);
std:air<double, double> result =
boost::math::tools::brent_find_minima(TrickyF, min, max, bits);
I started with this example:
http://net.pku.edu.cn/~webg/src/par...nclude/boost-1_35/boost/math/tools/minima.hpp
Thanks,
Markus
I try to use a function that minimizes another function (namely from
the Boost library: brent_find_minima). When I provide the function to
be minized at the very top level (ie, in the .cpp file) and call
brent_find_minima from the main block, it works fine but when I create
a class and define the function to be minimized in there (and also call
brent_find_minima in another function in that class), I get this error
during compilation:
error: argument of type ‘double (Testclass:(double)’ does not match
‘double (Testclass::*)(double)’
I had invoked brent_find_minima with this line (which works when called
in main);
std:air<double, double> result =
boost::math::tools::brent_find_minima(TrickyF, min, max, bits);
I started with this example:
http://net.pku.edu.cn/~webg/src/par...nclude/boost-1_35/boost/math/tools/minima.hpp
Thanks,
Markus