{"id":36530967,"url":"https://github.com/majornick/orderedset","last_synced_at":"2026-01-12T03:01:19.414Z","repository":{"id":63830919,"uuid":"571049608","full_name":"MajorNick/orderedSet","owner":"MajorNick","description":"Ordered Set, from classic STL, with functions like Lower-Bound and Bsearch. Every \"Big\" Operation works in log(n).","archived":false,"fork":false,"pushed_at":"2023-03-11T19:15:21.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-31T04:03:53.089Z","etag":null,"topics":["golang","orderedset","set","stl-containers"],"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/MajorNick.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":"2022-11-27T01:33:08.000Z","updated_at":"2023-02-07T18:25:24.000Z","dependencies_parsed_at":"2024-06-21T08:34:52.101Z","dependency_job_id":"7ecc93a1-6eb1-4606-886f-eada9892099e","html_url":"https://github.com/MajorNick/orderedSet","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.0625,"last_synced_commit":"3101cd196937b1509c6887b27412d0ca9d8852e2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MajorNick/orderedSet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MajorNick%2ForderedSet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MajorNick%2ForderedSet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MajorNick%2ForderedSet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MajorNick%2ForderedSet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MajorNick","download_url":"https://codeload.github.com/MajorNick/orderedSet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MajorNick%2ForderedSet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","orderedset","set","stl-containers"],"created_at":"2026-01-12T03:00:51.263Z","updated_at":"2026-01-12T03:01:19.409Z","avatar_url":"https://github.com/MajorNick.png","language":"Go","readme":"# Ordered Set\n\n## Ordered Set from Classic STL.\n\n### Writen using empty interfaces. So it can called Generics without actual Generics.\n\n### Pros: every \"Big\" method works in O(log(n)) complexity and can be used on all types\n\n### Cons: Regardless of whether it is primitive or not, you have to give NewSet()  Compare function.\n### And Also after inserting struct type in set and you need type assertion after getting element  from Set.\n\n### Example compare function for Integers:\n\n ```\n cmp := func (a,b interface{}) int {\n\t    a1 := a.(int)\n\t\tb1 := b.(int)\n\t\t   if a1 == b1 {\n\t\t\t   return 0\n\t\t}\n\t\tif(a1\u003eb1){\n\t\t\treturn 1\n\t\t}\n\t\treturn -1\n\t}\n  st := NewSet(cmp)\n```\n\n### Internal structure is \n```\ntype orderedSet struct{\n\tset []interface{}\n\tsize int\n\tcmp func(a, b interface{}) int\n}\n```\n### So if you want to get element from set use (your Set).Get(\"index\") \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajornick%2Forderedset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmajornick%2Forderedset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmajornick%2Forderedset/lists"}