fenwick-0.1.0
توضیحات
A Python implementation of Fenwick trees
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Unix |
| نام فایل | fenwick-0.1.0 |
| نام | fenwick |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Daniel Steinberg |
| ایمیل نویسنده | ds@dannyadam.com |
| آدرس صفحه اصلی | https://github.com/dstein64/fenwick |
| آدرس اینترنتی | https://pypi.org/project/fenwick/ |
| مجوز | MIT |
.. image:: https://github.com/dstein64/fenwick/workflows/build/badge.svg
:target: https://github.com/dstein64/fenwick/actions
fenwick
=======
A Python library that implements Fenwick trees, based on the algorithm in
(Fenwick 1994).
Features
--------
- Update a frequency in O(log n).
- Retrieve a single frequency in O(log n).
- Initialize existing frequencies in O(n).
- Retrieve all frequencies in O(n).
Requirements
------------
*fenwick* supports Python 2.7 and Python 3.x.
Linux, Mac, and Windows are supported.
Installation
------------
`fenwick <https://pypi.python.org/pypi/fenwick>`__ is available on PyPI, the Python Package Index.
::
$ pip install fenwick
Documentation
-------------
See `documentation.md <https://github.com/dstein64/fenwick/blob/master/documentation.md>`__.
Example Usage
-------------
See `example.py <https://github.com/dstein64/fenwick/blob/master/example.py>`__.
Tests
-----
Tests are in `tests/ <https://github.com/dstein64/fenwick/blob/master/tests>`__.
::
# Run tests
$ python -m unittest discover tests -v
License
-------
The code in this repository has an `MIT License <https://en.wikipedia.org/wiki/MIT_License>`__.
See `LICENSE <https://github.com/dstein64/fenwick/blob/master/LICENSE>`__.
References
----------
Fenwick, Peter M. 1994. “A New Data Structure for Cumulative Frequency Tables.”
Software: Practice and Experience 24 (3): 327–36.
نحوه نصب
نصب پکیج whl fenwick-0.1.0:
pip install fenwick-0.1.0.whl
نصب پکیج tar.gz fenwick-0.1.0:
pip install fenwick-0.1.0.tar.gz