Skip to content

snwfog/sparse_bit_array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Sparse Bit Array

## Description
A space efficient sparse bit array for Ruby, implemented in pure Ruby, tested on MRI.
Inspired from https://github.com/brettwooldridge/SparseBitSet.

## Assumptions
- Index starts at *zero*

## Usage

```ruby
bit_array = SparseBitArray.new(1000)
bit_array[0] = true
bit_array.set(0)

bit_array[0] # => true

bit_array[0] = false
bit_array.clear(0)

bit_arrayp0] # => false
```

About

sparse bit array

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages