00001
00002 #ifndef vnl_brent_h_
00003 #define vnl_brent_h_
00004
00005
00006
00007 #include <vnl/vnl_cost_function.h>
00008 #include <vnl/vnl_nonlinear_minimizer.h>
00009
00010 struct vnl_brent_data;
00011
00012
00013 class vnl_brent : public vnl_nonlinear_minimizer {
00014 public:
00015 vnl_brent(vnl_cost_function* functor);
00016 ~vnl_brent();
00017
00018 double minimize(double x);
00019 double minimize_given_bounds(double ax, double bx, double cx,
00020 double tol,
00021 double *xmin);
00022 void bracket_minimum(double *ax, double *bx, double *cx,
00023 double *fa, double *fb, double *fc);
00024
00025 void bracket_minimum(double *ax, double *bx, double *cx);
00026
00027 protected:
00028 vnl_brent_data *p;
00029 };
00030
00031 #endif