Silence LineSearch on demand.
Add LineSearch::Options::is_silent which allows the user to turn
off all LOG(WARNING) logging off.
This is useful when calling LineSearch from the TrustRegionMinimizer
where the verbosity of the line search is of no use.
Change-Id: I4f1855e98f3cf3c3659d92b54586ff88d64e5ebe
diff --git a/internal/ceres/line_search.h b/internal/ceres/line_search.h
index 5f24e9f..57ef9e7 100644
--- a/internal/ceres/line_search.h
+++ b/internal/ceres/line_search.h
@@ -71,6 +71,7 @@
max_num_iterations(20),
sufficient_curvature_decrease(0.9),
max_step_expansion(10.0),
+ is_silent(false),
function(NULL) {}
// Degree of the polynomial used to approximate the objective
@@ -144,6 +145,8 @@
// By definition for expansion, max_step_expansion > 1.0.
double max_step_expansion;
+ bool is_silent;
+
// The one dimensional function that the line search algorithm
// minimizes.
Function* function;