Skip to content

limix/brent-search

Repository files navigation

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

Documentation

Authors

Acknowledgements

License

This project is licensed under the MIT License.

About

Univariate function optimization based on Brent's method.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages