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
Testing
python -c "import brent_search; brent_search.test()"
Documentation
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-2.0.1.tar.gz
(8.8 kB
view details)
Built Distribution
File details
Details for the file brent-search-2.0.1.tar.gz
.
File metadata
- Download URL: brent-search-2.0.1.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6153e7541dc19ded662c7149fdc573d9367c41438d8c0e5dbcc751120b3ecb55 |
|
MD5 | 790de5a68c09d2b23028a4c53efbb4bb |
|
BLAKE2b-256 | d8895113f3c2ad9806ab12d2a61f31b609d14ea306dad65073f6ee8fba7cc544 |
File details
Details for the file brent_search-2.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: brent_search-2.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1151345d732585d719f3623a1f5b078e7989160dc4e427555662af37cdcaada4 |
|
MD5 | 6915a450364981f9e66fb98138377ffb |
|
BLAKE2b-256 | 179053fde834835d4b656733ec235dccd4db7932030080c28900f0dc6f712e25 |