An open API service indexing awesome lists of open source software.

https://github.com/foolnotion/lbfgs

Modern C++ port of the Limited-memory BFGS (L-BFGS) optimization algorithm
https://github.com/foolnotion/lbfgs

cpp20 gradient-descent lbfgs-algorithm

Last synced: 4 months ago
JSON representation

Modern C++ port of the Limited-memory BFGS (L-BFGS) optimization algorithm

Awesome Lists containing this project

README

          

## LBFGS

This repository contains a C++20 port of the [Limited-memory BFGS](https://en.wikipedia.org/wiki/Limited-memory_BFGS) implementation from [LBFGS-Lite](https://github.com/ZJU-FAST-Lab/LBFGS-Lite), with a number of usability improvements:

- error handling using the [outcome library](https://ned14.github.io/outcome/)
- a simplified API similar to the [Eigen Levenberg-Marquardt module](https://eigen.tuxfamily.org/dox/unsupported/group__NonLinearOptimization__Module.html)
- the ability to specify the scalar type (e.g. `float` or `double`)

### Limitations

- no step bounds
- no progress report
- no cancellation

These will be addressed in the future.

### Usage example

The user must define a functor which computes the function and its gradient. Please have a look at https://github.com/foolnotion/lbfgs/blob/main/test/source/lbfgs_test.cpp