{"id":15168638,"url":"https://github.com/sysread/p6-algorithm-skewheap","last_synced_at":"2026-01-23T16:08:58.179Z","repository":{"id":146316060,"uuid":"154541791","full_name":"sysread/p6-algorithm-skewheap","owner":"sysread","description":"An efficient and flexible min heap algorithm for perl6","archived":false,"fork":false,"pushed_at":"2019-11-06T13:53:11.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T20:33:25.962Z","etag":null,"topics":["data-structures","heap","perl6","priority-queue","skew-heap"],"latest_commit_sha":null,"homepage":null,"language":"Perl 6","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sysread.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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,"publiccode":null,"codemeta":null}},"created_at":"2018-10-24T17:32:25.000Z","updated_at":"2019-11-06T13:53:13.000Z","dependencies_parsed_at":"2023-07-02T17:16:18.334Z","dependency_job_id":null,"html_url":"https://github.com/sysread/p6-algorithm-skewheap","commit_stats":{"total_commits":10,"total_committers":2,"mean_commits":5.0,"dds":0.09999999999999998,"last_synced_commit":"65f18feaca42e9e169bcc5923662c1c50bfbe760"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-algorithm-skewheap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-algorithm-skewheap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-algorithm-skewheap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sysread%2Fp6-algorithm-skewheap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sysread","download_url":"https://codeload.github.com/sysread/p6-algorithm-skewheap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248060725,"owners_count":21041220,"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":["data-structures","heap","perl6","priority-queue","skew-heap"],"created_at":"2024-09-27T06:24:09.816Z","updated_at":"2026-01-23T16:08:53.156Z","avatar_url":"https://github.com/sysread.png","language":"Perl 6","readme":"NAME\n====\n\nAlgorithm::SkewHeap - a mergable min heap\n\nVERSION\n=======\n\n0.0.1\n\nSYNOPSIS\n========\n\n    use Algorithm::SkewHeap;\n\n    my $heap = Algorithm::SkewHeap.new;\n\n    for (1 .. 1000).pick(1000) -\u003e $n {\n        $heap.put($n);\n    }\n\n    until $heap.is-empty {\n        my $n = $heap.take;\n    }\n\n    $heap.merge($other-heap);\n\nDESCRIPTION\n===========\n\nA skew heap is a type of heap based on a binary tree in which all operations are based on merging subtrees, making it possible to quickly combine multiple heaps, while still retaining speed and efficiency. Ammortized performance is O(log n) or better (see [https://en.wikipedia.org/wiki/Skew_heap](https://en.wikipedia.org/wiki/Skew_heap)).\n\nSORTING\n=======\n\nItems in the heap are returned with the lowest first. Comparisons are done with the greater than operator, which may be overloaded as needed for types intended to be used in the heap.\n\nclass Algorithm::SkewHeap\n-------------------------\n\nSkewHeap class\n\n### method size\n\n```perl6\nmethod size() returns Int\n```\n\nReturns the number of items in the heap\n\n### method is-empty\n\n```perl6\nmethod is-empty() returns Bool\n```\n\nReturns true when the heap is empty\n\n### method top\n\n```perl6\nmethod top() returns Any\n```\n\nReturns the top item in the heap without removing it.\n\n### method take\n\n```perl6\nmethod take() returns Any\n```\n\nRemoves and returns the top item in the heap.\n\n### method put\n\n```perl6\nmethod put(\n    $value\n) returns Int\n```\n\nAdds a new item to the heap. Returns the new size of the heap.\n\n### method merge\n\n```perl6\nmethod merge(\n    Algorithm::SkewHeap $other\n) returns Int\n```\n\nDestructively merges with another heap. The other heap should be considered unusable afterward. Returns the new size of the heap.\n\n### method explain\n\n```perl6\nmethod explain() returns Nil\n```\n\nPrints the structure of the heap for debugging purposes.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fp6-algorithm-skewheap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsysread%2Fp6-algorithm-skewheap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsysread%2Fp6-algorithm-skewheap/lists"}