A Python implementation of Fenwick trees
Project description
A Python library that implements Fenwick trees, based on the algorithm in (Fenwick 1994).
Features
Initializes existing frequencies in O(n).
Requirements
fenwick supports Python 2.7 and Python 3.x.
Linux, Mac, and Windows are supported.
Installation
fenwick is available on PyPI, the Python Package Index.
$ pip install fenwick
Documentation
See documentation.md.
Example Usage
See example.py.
License
The code in this repository has an MIT License.
See LICENSE.
References
Fenwick, Peter M. 1994. “A New Data Structure for Cumulative Frequency Tables.” Software: Practice and Experience 24 (3): 327–36.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fenwick-0.0.2.tar.gz
(3.9 kB
view details)
File details
Details for the file fenwick-0.0.2.tar.gz
.
File metadata
- Download URL: fenwick-0.0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f8a4dd868a73e50f8ff4ee80a4684c4ea59ba5637c67b780c868bb671637890 |
|
MD5 | 4c723527ac055bb4aa3b21f3c568c4ca |
|
BLAKE2b-256 | fe2edfa38d3819c52843748b64bfda73b6c04cc3817e9605d33552e9635f419a |