{"id":15825952,"url":"https://github.com/thelartians/indexset","last_synced_at":"2025-07-04T04:36:43.838Z","repository":{"id":88218214,"uuid":"255381869","full_name":"TheLartians/IndexSet","owner":"TheLartians","description":"A class for manipulating large sets of indices with optimal performance and memory use","archived":false,"fork":false,"pushed_at":"2020-04-20T23:57:22.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-01T08:33:30.116Z","etag":null,"topics":["cpp","fast","high-performance","indices","low-memory","set"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheLartians.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2020-04-13T16:29:22.000Z","updated_at":"2024-06-26T19:42:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"1798e6ba-bc98-4829-a9c1-b7c5b010242f","html_url":"https://github.com/TheLartians/IndexSet","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"TheLartians/ModernCppStarter","purl":"pkg:github/TheLartians/IndexSet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLartians%2FIndexSet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLartians%2FIndexSet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLartians%2FIndexSet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLartians%2FIndexSet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheLartians","download_url":"https://codeload.github.com/TheLartians/IndexSet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheLartians%2FIndexSet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263448514,"owners_count":23468084,"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":["cpp","fast","high-performance","indices","low-memory","set"],"created_at":"2024-10-05T09:41:07.898Z","updated_at":"2025-07-04T04:36:43.790Z","avatar_url":"https://github.com/TheLartians.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Actions Status](https://github.com/TheLartians/IndexSet/workflows/MacOS/badge.svg)](https://github.com/TheLartians/IndexSet/actions)\n[![Actions Status](https://github.com/TheLartians/IndexSet/workflows/Windows/badge.svg)](https://github.com/TheLartians/IndexSet/actions)\n[![Actions Status](https://github.com/TheLartians/IndexSet/workflows/Ubuntu/badge.svg)](https://github.com/TheLartians/IndexSet/actions)\n[![Actions Status](https://github.com/TheLartians/IndexSet/workflows/Style/badge.svg)](https://github.com/TheLartians/IndexSet/actions)\n[![Actions Status](https://github.com/TheLartians/IndexSet/workflows/Install/badge.svg)](https://github.com/TheLartians/IndexSet/actions)\n[![codecov](https://codecov.io/gh/TheLartians/IndexSet/branch/master/graph/badge.svg)](https://codecov.io/gh/TheLartians/IndexSet)\n\n# IndexSet\n\nA small library to work on large sets of indices with optimal memory and runtime performance.\nInternally IndexSet is using the [BitLens](https://github.com/TheLartians/BitLens) library store indices as a bitmask vector.\nOperations on index sets are performed on data values, which is [many orders of magnitude faster](https://github.com/TheLartians/BitLens#Benchmark) than comparing individual indices.\n\n## Usage\n\nYou can easily add IndexSet through [CPM.cmake](https://github.com/TheLartians/CPM.cmake).\n\n```cmake\nCPMAddPackage(\n  NAME IndexSet\n  GITHUB_REPOSITORY TheLartians/IndexSet\n  VERSION 0.1\n)\n```\n\n## API\n\n```cpp\n#include \u003cindex_set.h\u003e\n#include \u003ciostream\u003e\n\nvoid example() {\n  // create index sets\n  auto a = index_set::createIndexSetFromIndices({2, 4, 6});\n  auto b = index_set::createIndexSetFromIndex(3);\n\n  // add and remove single indices (slow)\n  b.addIndex(6);\n  a.removeIndex(4);\n\n  // perform operations on index sets (very fast)\n  a.remove(b);\n  a.add(b);\n  a.intersect(b);\n\n  // iteration\n  for (auto index: a.indices()) { \n    std::cout \u003c\u003c index \u003c\u003c std::endl;\n  }\n\n  // printing\n  std::cout \u003c\u003c a \u003c\u003c std::endl;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthelartians%2Findexset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthelartians%2Findexset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthelartians%2Findexset/lists"}