12 #ifndef MLPACK_CORE_OPTIMIZERS_LINE_SEARCH_LINE_SEARCH_HPP 13 #define MLPACK_CORE_OPTIMIZERS_LINE_SEARCH_LINE_SEARCH_HPP 18 namespace optimization {
34 const double tolerance = 1e-5) :
35 maxIterations(maxIterations), tolerance(tolerance)
50 template<
typename FunctionType>
51 double Optimize(FunctionType&
function,
const arma::mat& x1, arma::mat& x2);
80 template<
typename FunctionType>
81 double Derivative(FunctionType&
function,
83 const arma::mat& deltaX,
89 #include "line_search_impl.hpp"
The core includes that mlpack expects; standard C++ includes and Armadillo.
double Tolerance() const
Get the tolerance for termination.
double Optimize(FunctionType &function, const arma::mat &x1, arma::mat &x2)
Line search to minimize function between two points with Secant method, that is, to find the zero of ...
size_t & MaxIterations()
Modify the maximum number of iterations (0 indicates no limit).
LineSearch(const size_t maxIterations=100000, const double tolerance=1e-5)
double & Tolerance()
Modify the tolerance for termination.
size_t MaxIterations() const
Get the maximum number of iterations (0 indicates no limit).
Find the minimum of a function along the line between two points.