Brent's method for univariate function optimization.
Project description
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
The recommended way of installing it is via conda
conda install -c conda-forge brent-search
An alternative way would be via pip
pip install brent-search
Running the tests
After installation, you can test it
python -c "import brent_search; brent_search.test()"
as long as you have pytest.
License
This project is licensed under the MIT License - see the LICENSE file for details
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.19.tar.gz
(7.8 kB
view hashes)
Built Distributions
Close
Hashes for brent_search-1.0.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f519e71957f2f59ce3064e414c614040e5fea13ece21bdbf9904b9fb0ec7be8c |
|
MD5 | 936a29f4edee34676661516b720f0fdf |
|
BLAKE2b-256 | 1ad55cfefbaf9e58edc5c90c964f12f25b1857451040d8244ad48ebd8dc64176 |
Close
Hashes for brent_search-1.0.19-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a410e68b255b7bee9516d9a5b251b3e1812dddff77ca3bb4652c41983be7d8 |
|
MD5 | e1fde58d3627adf790419f5cc99ad0bc |
|
BLAKE2b-256 | 54544ce2363ab7f268ba2f7c6921027de753f8535539e9c43b366d04c6991117 |