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
- Host: GitHub
- URL: https://github.com/foolnotion/lbfgs
- Owner: foolnotion
- Created: 2023-07-23T16:33:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-06T10:35:56.000Z (11 months ago)
- Last Synced: 2025-04-06T11:27:32.002Z (11 months ago)
- Topics: cpp20, gradient-descent, lbfgs-algorithm
- Language: C++
- Homepage: https://github.com/foolnotion/lbfgs
- Size: 41 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
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