{"id":22619774,"url":"https://github.com/biojulia/indexablebitvectors.jl","last_synced_at":"2025-04-11T15:21:08.595Z","repository":{"id":32964056,"uuid":"36578904","full_name":"BioJulia/IndexableBitVectors.jl","owner":"BioJulia","description":"Fully indexable dictionaries - access/rank/select operations","archived":false,"fork":false,"pushed_at":"2018-09-10T17:04:32.000Z","size":738,"stargazers_count":12,"open_issues_count":1,"forks_count":7,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-11T12:53:02.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BioJulia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-30T22:58:07.000Z","updated_at":"2021-06-29T17:35:15.000Z","dependencies_parsed_at":"2022-08-07T19:01:13.031Z","dependency_job_id":null,"html_url":"https://github.com/BioJulia/IndexableBitVectors.jl","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioJulia%2FIndexableBitVectors.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioJulia%2FIndexableBitVectors.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioJulia%2FIndexableBitVectors.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BioJulia%2FIndexableBitVectors.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BioJulia","download_url":"https://codeload.github.com/BioJulia/IndexableBitVectors.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429129,"owners_count":21101786,"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-12-08T22:08:32.671Z","updated_at":"2025-04-11T15:21:08.560Z","avatar_url":"https://github.com/BioJulia.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IndexableBitVectors\n\n[![Build Status](https://travis-ci.org/BioJulia/IndexableBitVectors.jl.svg?branch=master)](https://travis-ci.org/BioJulia/IndexableBitVectors.jl)\n[![IndexableBitVectors.jl](http://pkg.julialang.org/badges/IndexableBitVectors_0.4.svg)](http://pkg.julialang.org/?pkg=IndexableBitVectors\u0026ver=0.4)\n\nThis package exports following operations over bit vectors with extremely fast\nspeed while keeping extra memory usage small:\n\n* `getindex(bv::IndexableBitVectors, i::Integer)`: `i`-th element of `bv`\n* `rank(b::Bool, bv::AbstractIndexableBitVector, i::Integer)`: the number of occurrences of bit `b` in `bv[1:i]`\n* `select(b::Bool, bv::AbstractIndexableBitVector, i::Integer)`: the index of `i`-th occurrence of `b` in `bv`.\n\nAnd other shortcuts:\n\n* `rank0(bv, i)` = `rank(false, bv, i)`\n* `rank1(bv, i)` = `rank(true,  bv, i)`\n* `select0(bv, i)` = `select(0, bv, i)`\n* `select1(bv, i)` = `select(1, bv, i)`\n\nThe following two types are exported:\n\n* `SucVector`: rank values are precomputed in blocks.\n* `RRR`: compressible indexable bit vector.\n\nIn general, queries on `SucVector` is faster than those on `RRR`, but `RRR` is compressible.\n\nConversions from bit vectors are defined for these types. So you just pass a bit vector to them:\n\n```\njulia\u003e using IndexableBitVectors\n\njulia\u003e SucVector(bitrand(10))\n10-element IndexableBitVectors.SucVector:\n false\n false\n false\n false\n  true\n  true\n false\n false\n false\n  true\n\njulia\u003e RRR(bitrand(10))\n10-element IndexableBitVectors.RRR:\n false\n false\n false\n false\n  true\n false\n false\n false\n  true\n false\n\n```\n\n## Benchmarks:\n\nThe script and result of benchmarks can be found in the [benchmarks](./benchmarks)\ndirectory. Plots are in a Jupyter notebook: [benchmarks/plot.ipynb](./benchmarks/plot.ipynb).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiojulia%2Findexablebitvectors.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiojulia%2Findexablebitvectors.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiojulia%2Findexablebitvectors.jl/lists"}