From: <co...@we...> - 2008-04-28 11:35:11
|
Hi there I have found the following in VXL 1.10.0: The "vnl_nonlinear_minimizer" class defines a virtual function "bool report_iter()". The documentation states the following: "Called by derived classes after each iteration. When true is returned, minimizer should stop with code FAILED_USER_REQUEST. Derived classes can redefine this function to make the optimizer stop when a condition is satisfied." The "vnl_powell" class is derived from the "vnl_nonlinear_minimizer" class. In its implementation we see vnl_powell.cxx:136 report_iter(); To conform to the interface defined by the "vnl_nonlinear_minimizer" base class this should be vnl_powell.cxx:136 if (report_iter()) return FAILED_USER_REQUEST; The existing code works correctly only because the Powell minimizer calls the vnl_nonlinear_minimizer implementation of report_iter(), which always returns false. However, when one creates a class "Foo" derived from "vnl_powell" and override the virtual "report_iter()" function, it currently does not behave as expected because the return value is not handled. Regards, Cobus ------------------------------------------- South Africas premier free email service - www.webmail.co.za ------------------------------------------------------------------ For super low premiums, click here http://www.webmail.co.za/dd.pwm |