{"id":13710468,"url":"https://github.com/chucnorrisful/vEB","last_synced_at":"2025-05-06T19:31:05.550Z","repository":{"id":57627864,"uuid":"404001788","full_name":"chucnorrisful/vEB","owner":"chucnorrisful","description":"Go implementation of the van Emde Boas tree data structure: Priority queue for positive whole numbers in O(log log u) time.","archived":false,"fork":false,"pushed_at":"2023-11-05T13:44:11.000Z","size":44,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-13T20:40:48.050Z","etag":null,"topics":["go","golang","priority-queue","van-emde-boas","van-emde-boas-tree"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chucnorrisful.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2021-09-07T14:06:40.000Z","updated_at":"2023-10-14T00:20:38.000Z","dependencies_parsed_at":"2023-10-16T15:00:40.252Z","dependency_job_id":"7826c55c-032d-4287-a040-f9a40b317ecb","html_url":"https://github.com/chucnorrisful/vEB","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chucnorrisful%2FvEB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chucnorrisful%2FvEB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chucnorrisful%2FvEB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chucnorrisful%2FvEB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chucnorrisful","download_url":"https://codeload.github.com/chucnorrisful/vEB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252753248,"owners_count":21798938,"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":["go","golang","priority-queue","van-emde-boas","van-emde-boas-tree"],"created_at":"2024-08-02T23:00:56.968Z","updated_at":"2025-05-06T19:31:00.524Z","avatar_url":"https://github.com/chucnorrisful.png","language":"Go","funding_links":[],"categories":["Repositories"],"sub_categories":[],"readme":"# vEB\nGo implementation of the van Emde Boas tree data structure: Priority queue for positive whole numbers in O(log log u) time.\n\n## Supports the following Priority-Queue operations:\n\n**Insert(int)** insert a positive number, allowed range: [0, u)\n\n**Delete(int)** deletes a previously inserted number\n\n**Succ(int)** finds the next larger number that is already stored inside the tree. Note that the parameter of succ doesn't neet to exist inside the tree. Specially, Succ(-1) gives the minimum (smallest stored element) of the tree.\n\n## Runtime and Space:\n\nAll operations run in **O(log log u)** time with u being a large integer provided at initialisation providing an upper limit for the allowed numbers to be inserted.\nSpace requirement of the (fully filled with all u elements) tree is O(u), as well as initialisation time.\n\nCurrent implementation uses lazy initialisation, so the init-time is **O(sqrt(u))**, and Insert may run slower until all of the substructures of the tree were used at least once. I might add a switch to toggle both modes at some point in the future.\n\n## Usage:\n\n```\ngithub.com/chucnorrisful/vEB\n```\n\nSee [test/main.go](test/main.go) for examples.\n\n## Todos:\n\n- [ ] add safety features (member check on insertion, deletion etc.)\n- [ ] small optimisations: use bitmasks instead of integer division and mod2 calculations\n- [x] add switch for lazyInit vs. fullInit\n- [ ] add sparse-mode: usage of hashmaps instead of arrays in internal structure may yield in massive space savings if inserted elements are sparse in a large universe.\n- [ ] add linked-list for nodes of tree: enables Succ, Pred in constant time\n- [ ] edit PrioQ protocol to also consume Member, Pred, Min, Max\n- [ ] extend to negative numbers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchucnorrisful%2FvEB","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchucnorrisful%2FvEB","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchucnorrisful%2FvEB/lists"}