{"id":20085445,"url":"https://github.com/sergv/radix-tree","last_synced_at":"2025-05-06T01:33:04.314Z","repository":{"id":56875987,"uuid":"146200563","full_name":"sergv/radix-tree","owner":"sergv","description":"Haskell implementation of the radix tree data structure","archived":false,"fork":false,"pushed_at":"2024-04-22T13:02:56.000Z","size":153,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-22T13:37:55.525Z","etag":null,"topics":["datastructure","haskell","haskell-library","radix-tree"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sergv.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-08-26T17:13:21.000Z","updated_at":"2024-04-22T13:38:17.407Z","dependencies_parsed_at":"2024-04-22T13:38:06.442Z","dependency_job_id":"a1e4b99a-9d3f-486e-a3ec-1303f7b83c60","html_url":"https://github.com/sergv/radix-tree","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"fedffe9234a4c43a87780d28a013e7cb415140e4"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergv%2Fradix-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergv%2Fradix-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergv%2Fradix-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergv%2Fradix-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergv","download_url":"https://codeload.github.com/sergv/radix-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224480934,"owners_count":17318308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datastructure","haskell","haskell-library","radix-tree"],"created_at":"2024-11-13T15:55:56.800Z","updated_at":"2024-11-13T15:55:57.505Z","avatar_url":"https://github.com/sergv.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# radix-tree [![Hackage](http://img.shields.io/hackage/v/radix-tree.svg)](https://hackage.haskell.org/package/radix-tree)\n\n\nA Haskell library for [radix trees](https://en.wikipedia.org/wiki/Radix_tree).\n\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e \"strict\" and \"lazy\" interfaces within\n\u003e [`containers`](https://hackage.haskell.org/package/containers) and\n\u003e [`unordered-containers`](https://hackage.haskell.org/package/containers)\n\u003e refer to how new values are inserted into the data structures: \"strict\" means\n\u003e they're additionally evaluated to WHNF, \"lazy\" means they aren't.\n\u003e The data structures themselves are spine-strict in either case.\n\u003e\n\u003e Within this library \"strict\" and \"lazy\" refer to spine-strict and spine-lazy\n\u003e variants of a given data structure respectively. Evaluating the values before inserting\n\u003e them is directly assumed to be user's responsibility.\n\n\nFeaturing, in order of complexity:\n\n- `Data.Patricia.Word.*`: a\n  [PATRICIA tree](https://en.wikipedia.org/w/index.php?title=Radix_tree\u0026oldid=1196786955#Variants).\n\n  The spine-strict variant is effectively identical to\n  [`containers#IntMap`](https://hackage.haskell.org/package/containers-0.7/docs/Data-IntMap-Strict.html#t:IntMap).\n\n\n- `Data.Zebra.Word`: a space-partitioning tree based on a PATRICIA tree.\n\n  Similar to a\n  [`containers#IntSet`](https://hackage.haskell.org/package/containers-0.7/docs/Data-IntSet.html#t:IntSet),\n  a `Zebra` stores keys more optimally than a naive `StrictPatricia ()`.\n  The approaches are however different:\n\n  - An `IntSet` stores packs of 32/64\n    (depending on target platform integer size) adjacent bits together.\n    Fully identical feature-wise to regular `IntMap`s otherwise.\n\n  - A `Zebra` partitions the space into black and white zones, effectively storing\n    intervals of colors. This allows for fast range fills (see `fillRange`) as well as\n    fast lookups of the next key of a particular color (see `lookupL` and `lookupR`).\n\n  Due to the way it is constructed a `Zebra` cannot be spine-lazy.\n\n\n- `Data.RadixTree.Word8.*`: a radix tree.\n\n  A general-purpose dictionary type. Asymptotically faster than\n  [`containers#Map`](https://hackage.haskell.org/package/containers-0.7/docs/Data-Map-Strict.html)\n  (common key prefixes are only scrutinized once) and far more powerful than\n  [`unordered-containers#HashMap`](https://hackage.haskell.org/package/unordered-containers-0.2.20/docs/Data-HashMap-Strict.html#t:HashMap)\n  (no hash collisions, lookups can fail early, tree can be spine-lazy).\n\n  Note that unlike most dictionaries a `RadixTree` does not have a concrete key type\n  and instead uses two key representations: `Feed` (a key broken down to individual bytes)\n  and `Build` (a key reconstructed from chunks as they are found within the tree).\n  It is thus perfectly legal to mix together different key types, as long as they make\n  sense (e.g. a tree of ASCII keys can be treated as a tree of UTF-8 ones at no cost).\n\n\n- `Data.Radix1Tree.Word8.*`: a radix tree that cannot store anything at the empty key.\n\n  Exists as a consequence of internal implementation and is convenient for certain\n  formats where empty keys are impossible (such as commandline options and INI files).\n  Fully identical feature-wise to regular `RadixTree`s otherwise.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergv%2Fradix-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergv%2Fradix-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergv%2Fradix-tree/lists"}