Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bits-and-blooms/bitset
/ functions
Functions
342 in github.com/bits-and-blooms/bitset
⨍
Functions
342
◇
Types & classes
5
↓ 1 callers
Method
Read
(b []byte)
bitset_test.go:2402
↓ 1 callers
Method
SetBitsetFrom
SetBitsetFrom fills the bitset with an array of words without creating a new BitSet instance.
bitset.go:104
↓ 1 callers
Method
Words
Words returns the bitset as array of 64-bit words, giving direct access to the internal representation. It is not a copy, so changes to the returned s
bitset.go:139
↓ 1 callers
Method
isLenExactMultiple
Is the length an exact multiple of word sizes?
bitset.go:1203
↓ 1 callers
Function
max
Helper function for max
bitset_fuzz_test.go:488
↓ 1 callers
Function
onScroll
()
docs/main.js:50
↓ 1 callers
Function
readUint64Array
(reader io.Reader, data []uint64)
bitset.go:1292
↓ 1 callers
Method
safeSet
safeSet will fixup b.set to be non-nil and return the field value
bitset.go:96
↓ 1 callers
Function
select64
(w uint64, j uint)
select.go:5
↓ 1 callers
Function
writeUint64Array
(writer io.Writer, data []uint64)
bitset.go:1313
Function
BenchmarkBitSetExtractDeposit
(b *testing.B)
bitset_test.go:3296
Function
BenchmarkBitSetOnesBetween
(b *testing.B)
bitset_test.go:2910
Function
BenchmarkBitsetOps
go test -bench=BitsetOps
bitset_benchmark_test.go:91
Function
BenchmarkBitsetReadWrite
(b *testing.B)
bitset_benchmark_test.go:546
Function
BenchmarkCardinalitySmall
BenchmarkCardinalitySmall covers the binary cardinality operations on small bitsets, where call overhead dominates and inlining matters.
bitset_benchmark_test.go:701
Function
BenchmarkClearRMS
clear the right most bit (C-RMS) test two different algorithms
bitset_benchmark_test.go:637
Function
BenchmarkCount
go test -bench=Count
bitset_benchmark_test.go:46
Function
BenchmarkFlorianUekermannIterateMany
go test -bench=BenchmarkFlorianUekermannIterateMany
bitset_benchmark_test.go:292
Function
BenchmarkFlorianUekermannIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:343
Function
BenchmarkFlorianUekermannIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:313
Function
BenchmarkFlorianUekermannLowDensityIterateMany
Mid density go test -bench=BenchmarkFlorianUekermannLowDensityIterateMany
bitset_benchmark_test.go:359
Function
BenchmarkFlorianUekermannLowDensityIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:403
Function
BenchmarkFlorianUekermannLowDensityIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:384
Function
BenchmarkFlorianUekermannMidDensityIterateMany
Mid density go test -bench=BenchmarkFlorianUekermannMidDensityIterateMany
bitset_benchmark_test.go:422
Function
BenchmarkFlorianUekermannMidDensityIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:467
Function
BenchmarkFlorianUekermannMidDensityIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:448
Function
BenchmarkFlorianUekermannMidStrongDensityIterateMany
High density
bitset_benchmark_test.go:485
Function
BenchmarkFlorianUekermannMidStrongDensityIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:530
Function
BenchmarkFlorianUekermannMidStrongDensityIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:511
Function
BenchmarkGetTest
(b *testing.B)
bitset_benchmark_test.go:24
Function
BenchmarkIsSuperSet
(b *testing.B)
bitset_benchmark_test.go:561
Function
BenchmarkIter
(b *testing.B)
bitset_iter_test.go:88
Function
BenchmarkIterate
go test -bench=Iterate
bitset_benchmark_test.go:59
Function
BenchmarkLemireCount
go test -bench=LemireCount see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:201
Function
BenchmarkLemireCreate
go test -bench=LemireCreate see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:190
Function
BenchmarkLemireIterate
go test -bench=LemireIterate see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:218
Function
BenchmarkLemireIterateManyb
go test -bench=BenchmarkLemireIterateManyb see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:257
Function
BenchmarkLemireIterateb
go test -bench=LemireIterateb see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:237
Function
BenchmarkNonInter
(b *testing.B)
bitset_iter_test.go:104
Function
BenchmarkPDEP
(b *testing.B)
bitset_test.go:2965
Function
BenchmarkPEXT
(b *testing.B)
bitset_test.go:2951
Function
BenchmarkRank
go test -bench=Rank
bitset_benchmark_test.go:659
Function
BenchmarkSet
(b *testing.B)
bitset_benchmark_test.go:13
Function
BenchmarkSetExpand
(b *testing.B)
bitset_benchmark_test.go:35
Function
BenchmarkSetVsSetRange
(b *testing.B)
bitset_benchmark_test.go:674
Function
BenchmarkSparseIterate
go test -bench=SparseIterate
bitset_benchmark_test.go:75
Function
Example
Example gives a tour of the most common operations: creating a set, setting and testing bits, chaining, and querying the population count and length.
example_test.go:15
Function
ExampleBitSet_Any
ExampleBitSet_Any shows the emptiness predicates. All, Any and None answer "are all/any/no bits set?".
example_test.go:182
Function
ExampleBitSet_Clear
ExampleBitSet_Clear turns an individual bit off.
example_test.go:62
Function
ExampleBitSet_Complement
ExampleBitSet_Complement flips every bit within the set's length.
example_test.go:163
Function
ExampleBitSet_Count
ExampleBitSet_Count reports the number of set bits (the cardinality).
example_test.go:88
Function
ExampleBitSet_Difference
ExampleBitSet_Difference returns the bits set in a but not in b.
example_test.go:146
Function
ExampleBitSet_EachSet
ExampleBitSet_EachSet iterates over the set bits using a range-over-function loop. This is the most concise way to visit every set bit on Go 1.23+.
example_iter_test.go:10
Function
ExampleBitSet_Flip
ExampleBitSet_Flip toggles a single bit.
example_test.go:70
Function
ExampleBitSet_FlipRange
ExampleBitSet_FlipRange toggles every bit in the half-open range [start, end).
example_test.go:80
Function
ExampleBitSet_InPlaceUnion
ExampleBitSet_InPlaceUnion mutates the receiver instead of allocating a new set. The In-Place variants (and the *Cardinality helpers) avoid allocation
example_test.go:172
Function
ExampleBitSet_Intersection
ExampleBitSet_Intersection returns a new set containing the bits set in both.
example_test.go:138
Function
ExampleBitSet_IsSuperSet
ExampleBitSet_IsSuperSet reports whether every bit of other is also set here.
example_test.go:195
Function
ExampleBitSet_Len
()
bitset_test.go:112
Function
ExampleBitSet_MarshalJSON
ExampleBitSet_MarshalJSON round-trips a BitSet through JSON. BitSet implements json.Marshaler and json.Unmarshaler.
example_test.go:262
Function
ExampleBitSet_NextClear
ExampleBitSet_NextClear finds the first clear (unset) bit at or after i.
example_test.go:121
Function
ExampleBitSet_NextSet
ExampleBitSet_NextSet is the idiomatic way to iterate over the set bits in ascending order on any Go version.
example_test.go:96
Function
ExampleBitSet_NextSetMany
ExampleBitSet_NextSetMany retrieves many set bits at once into a reusable buffer, which is useful for batching in hot loops.
example_test.go:110
Function
ExampleBitSet_Rank
ExampleBitSet_Rank counts how many bits are set at or below the given index.
example_test.go:210
Function
ExampleBitSet_Select
ExampleBitSet_Select returns the index of the j-th set bit (0-indexed).
example_test.go:222
Function
ExampleBitSet_Set
ExampleBitSet_Set demonstrates chaining, which works because Set (and Clear, Flip, ...) return the receiver.
example_test.go:54
Function
ExampleBitSet_String
ExampleBitSet_String renders the set in mathematical set notation.
example_test.go:203
Function
ExampleBitSet_SymmetricDifference
ExampleBitSet_SymmetricDifference returns the bits set in exactly one of the two sets.
example_test.go:155
Function
ExampleBitSet_Union
ExampleBitSet_Union returns a new set containing every bit set in either set.
example_test.go:130
Function
ExampleBitSet_WriteTo
ExampleBitSet_WriteTo serializes a BitSet to a stream and reads it back with ReadFrom. The encoding is portable across platforms.
example_test.go:235
Function
ExampleFrom
ExampleFrom builds a BitSet directly from packed 64-bit words, which is handy when interoperating with other bitmap representations.
example_test.go:45
Function
ExampleNew
ExampleNew shows creating a BitSet with a size hint. The hint avoids re-allocations; the set still grows automatically past the hint if needed.
example_test.go:36
Function
FuzzBasicOps
FuzzBasicOps tests basic set, clear, test operations
bitset_fuzz_test.go:19
Function
FuzzCapacityAndGrowth
FuzzCapacityAndGrowth tests capacity management and memory growth
bitset_fuzz_test.go:627
Function
FuzzCopy
FuzzCopy tests clone and copy operations
bitset_fuzz_test.go:433
Function
FuzzIterationConsistency
FuzzIterationConsistency tests that iteration methods return consistent results
bitset_fuzz_test.go:692
Function
FuzzModification
FuzzModification tests insert/delete operations
bitset_fuzz_test.go:344
Function
FuzzNavigation
FuzzNavigation tests Next/Previous operations
bitset_fuzz_test.go:206
Function
FuzzRandomOperations
FuzzRandomOperations performs random sequences of operations
bitset_fuzz_test.go:555
Function
FuzzRange
FuzzRange tests range operations like FlipRange
bitset_fuzz_test.go:69
Function
FuzzSelect
(f *testing.F)
bitset_fuzz_test.go:400
Function
FuzzSerialization
FuzzSerialization tests JSON marshaling/unmarshaling and other serialization
bitset_fuzz_test.go:496
Function
FuzzSetOperations
FuzzSetOperations tests set operations like Union, Intersection, Difference
bitset_fuzz_test.go:115
Function
FuzzShift
FuzzShift tests shift operations
bitset_fuzz_test.go:281
Function
FuzzStringRepresentations
FuzzStringRepresentations tests string and dump operations
bitset_fuzz_test.go:780
Function
TestAll
(t *testing.T)
bitset_test.go:897
Function
TestAppendTo
(t *testing.T)
bitset_test.go:506
Function
TestAsSlice
(t *testing.T)
bitset_test.go:544
Function
TestBinaryOrder
(t *testing.T)
bitset_test.go:3335
Function
TestBitSetAndGet
(t *testing.T)
bitset_test.go:166
Function
TestBitSetDeposit
(t *testing.T)
bitset_test.go:3172
Function
TestBitSetExtract
(t *testing.T)
bitset_test.go:3058
Function
TestBitSetHuge
(t *testing.T)
bitset_test.go:76
Function
TestBitSetIsClear
(t *testing.T)
bitset_test.go:122
Function
TestBitSetNew
(t *testing.T)
bitset_test.go:69
Function
TestBitSetOnesBetween
(t *testing.T)
bitset_test.go:2846
Function
TestBytes
Bytes is deprecated
bitset_test.go:1903
Function
TestCap
(t *testing.T)
bitset_test.go:1918
Function
TestChain
(t *testing.T)
bitset_test.go:616
Function
TestClearAll
(t *testing.T)
bitset_test.go:1952
← previous
next →
101–200 of 342, ranked by callers