I’m looking for a software package to solve a very large, sparse non-linear least squares problem in C++. I’ve come across a large number of modern linalg libraries in C++ (eigen, armadillo, boost, etc.), but none seem to have such a solver (or even a regular least-squares solver) built in. I’d really like to avoid a bunch of messy calls to an old C / Fortran interface if possible. Thanks!
Share
I would simply use the general-purpose NLP solver IPOPT written in C++. It is the most robust solver among those I have tried and it is meant and successfully used on very large problems.
A change in requirements (e.g. adding constraints) would be no problem if you use the general-purpose IPOPT.
The time consuming part of the solution procedure is to solve the linear systems in each iteration step so it’s worth getting the best linear solver + LinAlg package for your platform.
Unfortunately IPOPT calls Fortran subroutines internally so you will need a Fortran compiler which is sort of a pain.
If IPOPT is not enough, you will have to look for a problem specific solver.