{"id":13509013,"url":"https://github.com/takscape/elixir-heapq","last_synced_at":"2025-10-21T15:48:19.544Z","repository":{"id":21220662,"uuid":"24534566","full_name":"takscape/elixir-heapq","owner":"takscape","description":"A Heap-based Priority Queue Implementation in Elixir.","archived":false,"fork":false,"pushed_at":"2015-12-24T21:44:24.000Z","size":120,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T09:11:01.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/takscape.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}},"created_at":"2014-09-27T15:02:04.000Z","updated_at":"2023-02-11T18:30:58.000Z","dependencies_parsed_at":"2022-07-27T02:02:06.360Z","dependency_job_id":null,"html_url":"https://github.com/takscape/elixir-heapq","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takscape%2Felixir-heapq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takscape%2Felixir-heapq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takscape%2Felixir-heapq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takscape%2Felixir-heapq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takscape","download_url":"https://codeload.github.com/takscape/elixir-heapq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222552313,"owners_count":17002040,"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":[],"created_at":"2024-08-01T02:01:01.752Z","updated_at":"2025-10-21T15:48:19.454Z","avatar_url":"https://github.com/takscape.png","language":"Elixir","funding_links":[],"categories":["Queue"],"sub_categories":[],"readme":"HeapQueue\n=========\n\nA Heap-based priority queue implementation in Elixir.\nPorted from  Michael Truog's pqueue2.\n\nOriginal copyright:\n\n```\nBSD LICENSE\n\nCopyright (c) 2011, Michael Truog \u003cmjtruog at gmail dot com\u003e\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright\n      notice, this list of conditions and the following disclaimer.\n    * Redistributions in binary form must reproduce the above copyright\n      notice, this list of conditions and the following disclaimer in\n      the documentation and/or other materials provided with the\n      distribution.\n    * All advertising materials mentioning features or use of this\n      software must display the following acknowledgment:\n        This product includes software developed by Michael Truog\n    * The name of the author may not be used to endorse or promote\n      products derived from this software without specific prior\n      written permission\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND\nCONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,\nINCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\nOF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH\nDAMAGE.\n```\n\n## Usage\n\n```\n# Create\nq = HeapQueue.new()\n\n# Push\nq = HeapQueue.push(\n    q,\n    1, # priority\n    \"foo\" # value\n    )\n\n# Pop\n{{:value, priority, value}, newq} = HeapQueue.pop(q)\n{:empty, _} = HeapQueue.pop(newq)\n\n# Convert to list\nHeapQueue.to_list(q)\n\n# Misc.\nHeapQueue.size(q)\nHeapQueue.empty?(q)\nHeapQueue.queue?(q)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakscape%2Felixir-heapq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakscape%2Felixir-heapq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakscape%2Felixir-heapq/lists"}