From 896a67e280d41df613092279f76913f8372faba1 Mon Sep 17 00:00:00 2001 From: astrojhgu Date: Sun, 11 Oct 2009 16:24:22 +0000 Subject: git-svn-id: file:///home/svn/opt_utilities@79 ed2142bd-67ad-457f-ba7c-d818d4011675 --- core/optimizer.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'core/optimizer.hpp') diff --git a/core/optimizer.hpp b/core/optimizer.hpp index 6380d66..bb26bfb 100644 --- a/core/optimizer.hpp +++ b/core/optimizer.hpp @@ -198,6 +198,13 @@ namespace opt_utilities { return typeid(*this).name(); } + + /** + interrupting the optimization + */ + virtual void do_stop() + { + } public: /** Interface function for seting optimizer @@ -300,6 +307,13 @@ namespace opt_utilities return do_clone(); } + /** + stop the optimization + */ + void stop() + { + do_stop(); + } /** destroy the cloned object. @@ -621,6 +635,17 @@ namespace opt_utilities } return p_opt_method->optimize(); } + + /** + stop the optimize + */ + void stop() + { + if(p_opt_method) + { + p_opt_method->stop(); + } + } /** \return the pointer to the inner object function -- cgit v1.2.2