===============
interval-search
===============
.. image:: https://img.shields.io/pypi/v/interval-search.svg
:target: https://pypi.python.org/pypi/interval-search
.. image:: https://img.shields.io/travis/mmore500/interval-search.svg
:target: https://travis-ci.com/mmore500/interval-search
.. image:: https://readthedocs.org/projects/interval-search/badge/?version=latest
:target: https://interval-search.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
interval-search provides predicate-based binary and doubling search implementations
* Free software: MIT license
* Documentation: https://interval-search.readthedocs.io.
.. code-block:: python3
import interval_search as inch
# inch.binary_search
list_ = [1, 10, 20, 500, 5000]
inch.binary_search(lambda x: list_[x] >= 20, 0, len(list_) - 1)
# -> 2
# inch.doubling_search
inch.doubling_search(lambda x: x >= 5) # -> 5
# with a lower bound to start searching at,
inch.doubling_search(lambda x: x >= 5, 10) # -> 10
# inch.interval_search
# uses binary search or doubling search
# depending on whether upper bound is specified
inch.interval_search(lambda x: list_[x] >= 20, 0, len(list_) - 1)
# -> 2
inch.interval_search(lambda x: x >= 5, 10) # -> 10
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.0.0 (2022-02-22)
------------------
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/mmore500/interval-search",
"name": "interval-search",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "interval-search",
"author": "Matthew Andres Moreno",
"author_email": "m.more500@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/6b/dc/bf0f34fea6fdb607096701ed4522473e6ff90ef9cf73b248913ee3a560d4/interval-search-0.5.2.tar.gz",
"platform": null,
"description": "===============\ninterval-search\n===============\n\n\n.. image:: https://img.shields.io/pypi/v/interval-search.svg\n :target: https://pypi.python.org/pypi/interval-search\n\n.. image:: https://img.shields.io/travis/mmore500/interval-search.svg\n :target: https://travis-ci.com/mmore500/interval-search\n\n.. image:: https://readthedocs.org/projects/interval-search/badge/?version=latest\n :target: https://interval-search.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n\n\ninterval-search provides predicate-based binary and doubling search implementations\n\n\n* Free software: MIT license\n* Documentation: https://interval-search.readthedocs.io.\n\n\n.. code-block:: python3\n\n import interval_search as inch\n\n\n\n # inch.binary_search\n list_ = [1, 10, 20, 500, 5000]\n inch.binary_search(lambda x: list_[x] >= 20, 0, len(list_) - 1)\n # -> 2\n\n # inch.doubling_search\n inch.doubling_search(lambda x: x >= 5) # -> 5\n # with a lower bound to start searching at,\n inch.doubling_search(lambda x: x >= 5, 10) # -> 10\n\n # inch.interval_search\n # uses binary search or doubling search\n # depending on whether upper bound is specified\n inch.interval_search(lambda x: list_[x] >= 20, 0, len(list_) - 1)\n # -> 2\n inch.interval_search(lambda x: x >= 5, 10) # -> 10\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.0.0 (2022-02-22)\n------------------\n\n* First release on PyPI.\n\n\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "interval-search provides predicate-based binary and doubling search implementations",
"version": "0.5.2",
"project_urls": {
"Homepage": "https://github.com/mmore500/interval-search"
},
"split_keywords": [
"interval-search"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c625d4f9579a1fc89c00446908156c2622ff54bc49309d263490dbafa286ee0f",
"md5": "50a79147928d47bd5c28fde28aad52fc",
"sha256": "8a324fa987981e79b24b68984665e4dad50b2329d4f86c611fe75990ac9f000d"
},
"downloads": -1,
"filename": "interval_search-0.5.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "50a79147928d47bd5c28fde28aad52fc",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.6",
"size": 9633,
"upload_time": "2023-07-05T09:40:03",
"upload_time_iso_8601": "2023-07-05T09:40:03.324829Z",
"url": "https://files.pythonhosted.org/packages/c6/25/d4f9579a1fc89c00446908156c2622ff54bc49309d263490dbafa286ee0f/interval_search-0.5.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6bdcbf0f34fea6fdb607096701ed4522473e6ff90ef9cf73b248913ee3a560d4",
"md5": "8dca8a340584efa97f93138d9f968f7c",
"sha256": "3259c871f46906f0e4cb96ad5db56425bfa14b2377f5d36017c426d87b7d54c3"
},
"downloads": -1,
"filename": "interval-search-0.5.2.tar.gz",
"has_sig": false,
"md5_digest": "8dca8a340584efa97f93138d9f968f7c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 12360,
"upload_time": "2023-07-05T09:40:04",
"upload_time_iso_8601": "2023-07-05T09:40:04.807928Z",
"url": "https://files.pythonhosted.org/packages/6b/dc/bf0f34fea6fdb607096701ed4522473e6ff90ef9cf73b248913ee3a560d4/interval-search-0.5.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-05 09:40:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mmore500",
"github_project": "interval-search",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "interval-search"
}