Brent''s method for univariate function optimization
Project description
brent-search
Brent's method for univariate function optimization.
Example
from brent_search import brent
def func(x, s):
return (x - s)**2 - 0.8
r = brent(lambda x: func(x, 0), -10, 10)
print(r)
The output should be
(0.0, -0.8, 6)
Install
From command line, enter
pip install brent-search
Running the tests
Install dependencies
pip install -U pytest pytest-pep8
then run
python -c "import brent_search; brent_search.test()"
Authors
Acknowledgements
- http://people.sc.fsu.edu/~jburkardt/c_src/brent/brent.c
- Numerical Recipes 3rd Edition: The Art of Scientific Computing
- https://en.wikipedia.org/wiki/Brent%27s_method
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
brent-search-1.0.33.tar.gz
(7.6 kB
view hashes)