From 438b84b90d7f91e514939728a909af23358771cb Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 24 Jul 2010 22:23:46 +0000 Subject: [PATCH] Added some missing "explicit" keywords. --HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403781 --- dlib/optimization/optimization_search_strategies.h | 4 ++-- dlib/optimization/optimization_search_strategies_abstract.h | 4 ++-- dlib/optimization/optimization_stop_strategies.h | 4 ++-- dlib/optimization/optimization_stop_strategies_abstract.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlib/optimization/optimization_search_strategies.h b/dlib/optimization/optimization_search_strategies.h index aab8cb870..a7682c4bb 100644 --- a/dlib/optimization/optimization_search_strategies.h +++ b/dlib/optimization/optimization_search_strategies.h @@ -154,7 +154,7 @@ namespace dlib class lbfgs_search_strategy { public: - lbfgs_search_strategy(unsigned long max_size_) : max_size(max_size_), been_used(false) + explicit lbfgs_search_strategy(unsigned long max_size_) : max_size(max_size_), been_used(false) { DLIB_ASSERT ( max_size > 0, @@ -284,7 +284,7 @@ namespace dlib class newton_search_strategy_obj { public: - newton_search_strategy_obj( + explicit newton_search_strategy_obj( const hessian_funct& hess ) : hessian(hess) {} diff --git a/dlib/optimization/optimization_search_strategies_abstract.h b/dlib/optimization/optimization_search_strategies_abstract.h index 9379b8ea0..e017fa512 100644 --- a/dlib/optimization/optimization_search_strategies_abstract.h +++ b/dlib/optimization/optimization_search_strategies_abstract.h @@ -172,7 +172,7 @@ namespace dlib to use when an optimization problem has a large number of variables. !*/ public: - lbfgs_search_strategy( + explicit lbfgs_search_strategy( unsigned long max_size ); /*! @@ -254,7 +254,7 @@ namespace dlib search_direction = -inv(hessian(x))*derivative !*/ public: - newton_search_strategy_obj( + explicit newton_search_strategy_obj( const hessian_funct& hess ); /*! diff --git a/dlib/optimization/optimization_stop_strategies.h b/dlib/optimization/optimization_stop_strategies.h index 11a8997b9..139b552d5 100644 --- a/dlib/optimization/optimization_stop_strategies.h +++ b/dlib/optimization/optimization_stop_strategies.h @@ -18,7 +18,7 @@ namespace dlib class objective_delta_stop_strategy { public: - objective_delta_stop_strategy ( + explicit objective_delta_stop_strategy ( double min_delta = 1e-7 ) : _verbose(false), _been_used(false), _min_delta(min_delta), _max_iter(0), _cur_iter(0), _prev_funct_value(0) { @@ -97,7 +97,7 @@ namespace dlib class gradient_norm_stop_strategy { public: - gradient_norm_stop_strategy ( + explicit gradient_norm_stop_strategy ( double min_norm = 1e-7 ) : _verbose(false), _min_norm(min_norm), _max_iter(0), _cur_iter(0) { diff --git a/dlib/optimization/optimization_stop_strategies_abstract.h b/dlib/optimization/optimization_stop_strategies_abstract.h index 7d994b10a..c5f5c7526 100644 --- a/dlib/optimization/optimization_stop_strategies_abstract.h +++ b/dlib/optimization/optimization_stop_strategies_abstract.h @@ -26,7 +26,7 @@ namespace dlib !*/ public: - objective_delta_stop_strategy ( + explicit objective_delta_stop_strategy ( double min_delta = 1e-7 ); /*! @@ -95,7 +95,7 @@ namespace dlib !*/ public: - gradient_norm_stop_strategy ( + explicit gradient_norm_stop_strategy ( double min_norm = 1e-7 ); /*!