interval-search
interval-search provides predicate-based binary and doubling search implementations
Free software: MIT license
Documentation: https://interval-search.readthedocs.io.
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.
History
0.0.0 (2022-02-22)
First release on PyPI.
Metadata
Release files for interval-search 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| interval-search-0.5.2.tar.gz | 12.4 kB | Without provenance | Details for interval-search-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| interval_search-0.5.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for interval_search-0.5.2-py2.py3-none-any.whl |
Total release size: 22.0 kB
Release files / interval-search-0.5.2.tar.gz
| Download URL | interval-search-0.5.2.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3259c871f46906f0e4cb96ad5db56425bfa14b2377f5d36017c426d87b7d54c3
|
|
BLAKE2b-256 checksum How to use checksums |
6bdcbf0f34fea6fdb607096701ed4522473e6ff90ef9cf73b248913ee3a560d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / interval_search-0.5.2-py2.py3-none-any.whl
| Download URL | interval_search-0.5.2-py2.py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8a324fa987981e79b24b68984665e4dad50b2329d4f86c611fe75990ac9f000d
|
|
BLAKE2b-256 checksum How to use checksums |
c625d4f9579a1fc89c00446908156c2622ff54bc49309d263490dbafa286ee0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Security for interval-search 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.