PatWie / CppNumericalSolvers

a lightweight header-only C++17 library of numerical optimization methods for nonlinear functions based on Eigen
MIT License
878 stars 201 forks source link

Enable changing line search strategies? #134

Closed unclejimbo closed 3 years ago

unclejimbo commented 3 years ago

Hi, thanks for your great work.

Currently the line search functions are hard-coded into the solvers. But sometimes we want to use the base solver for the search direction but use a different line search algorithm based on the specific problem at hand. Do you ever consider adding an option to let the user change line search strategies? Maybe as a template parameter to the Solver class.

PatWie commented 3 years ago

The line-search methods have been carefully chosen to make the benchmark functions pass. I am happy to take a PR that exposes the line-search method (ideally as a function within a solver-struct) to the solver-algorithm.