{"categories":[{"label":"Scientific/Engineering","url":"https://skillfed.io/packages/category/scientific-engineering/5"}],"enrichment":{"capability":"Implements a red/black tree that stores partial aggregations at each node, enabling O(log N) range sum queries on sorted key-value pairs.","skillfed_tags":["data-structures","range-queries"],"use_cases":["Computing cumulative sums over ranges of time-series data in O(log N) time","Building digest or histogram structures that need efficient percentile or range-based statistics","Implementing range queries in sorted key-value stores without scanning all intermediate values","Aggregating metrics or measurements across time windows in monitoring or analytics pipelines"],"what_it_does":"AccumulationTree is a red/black binary search tree variant that maintains partial aggregations (sums, products, or other reductions) at each node. This design allows range queries\u2014asking for the accumulated value across all keys between two bounds\u2014to complete in O(log N) time instead of requiring a linear scan. The package is similar in purpose to a Fenwick tree but uses explicit heap-allocated nodes rather than an implicit array-based structure.\n\nThe package was originally written for use in tdigest and borrows implementation details from bintrees. It accepts a user-supplied aggregation function (e.g., `lambda x: x` for summation) and supports insertion and range accumulation queries. No external runtime dependencies are required, making it a lightweight addition to projects that need fast range aggregations on sorted data.","worth_installing":"Yes, if you need fast range aggregations on sorted data and are comfortable with high install friction from a source distribution. The dormant maintenance status (last release 687 days ago) and lack of active development are acceptable for a stable, narrow-purpose data structure with no known vulnerabilities, but expect no updates or support for new Python versions."},"id":"accumulation-tree","links":{"html":"https://skillfed.io/packages/accumulation-tree","md":"https://skillfed.io/packages/accumulation-tree.md","pypi":"https://pypi.org/project/accumulation-tree/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-09-26","license_spdx":null,"license_treatment":"permissive","name":"accumulation-tree","python_support":"unspecified","summary":"Red/black tree with support for fast accumulation of values in a key range"},"popularity":{"monthly_downloads":231465,"position":9086,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.6.4"}
