MCPcopy Create free account

hub / github.com/bits-and-blooms/bitset / functions

Functions342 in github.com/bits-and-blooms/bitset

↓ 1 callersMethodRead
(b []byte)
bitset_test.go:2402
↓ 1 callersMethodSetBitsetFrom
SetBitsetFrom fills the bitset with an array of words without creating a new BitSet instance.
bitset.go:104
↓ 1 callersMethodWords
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 callersMethodisLenExactMultiple
Is the length an exact multiple of word sizes?
bitset.go:1203
↓ 1 callersFunctionmax
Helper function for max
bitset_fuzz_test.go:488
↓ 1 callersFunctiononScroll
()
docs/main.js:50
↓ 1 callersFunctionreadUint64Array
(reader io.Reader, data []uint64)
bitset.go:1292
↓ 1 callersMethodsafeSet
safeSet will fixup b.set to be non-nil and return the field value
bitset.go:96
↓ 1 callersFunctionselect64
(w uint64, j uint)
select.go:5
↓ 1 callersFunctionwriteUint64Array
(writer io.Writer, data []uint64)
bitset.go:1313
FunctionBenchmarkBitSetExtractDeposit
(b *testing.B)
bitset_test.go:3296
FunctionBenchmarkBitSetOnesBetween
(b *testing.B)
bitset_test.go:2910
FunctionBenchmarkBitsetOps
go test -bench=BitsetOps
bitset_benchmark_test.go:91
FunctionBenchmarkBitsetReadWrite
(b *testing.B)
bitset_benchmark_test.go:546
FunctionBenchmarkCardinalitySmall
BenchmarkCardinalitySmall covers the binary cardinality operations on small bitsets, where call overhead dominates and inlining matters.
bitset_benchmark_test.go:701
FunctionBenchmarkClearRMS
clear the right most bit (C-RMS) test two different algorithms
bitset_benchmark_test.go:637
FunctionBenchmarkCount
go test -bench=Count
bitset_benchmark_test.go:46
FunctionBenchmarkFlorianUekermannIterateMany
go test -bench=BenchmarkFlorianUekermannIterateMany
bitset_benchmark_test.go:292
FunctionBenchmarkFlorianUekermannIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:343
FunctionBenchmarkFlorianUekermannIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:313
FunctionBenchmarkFlorianUekermannLowDensityIterateMany
Mid density go test -bench=BenchmarkFlorianUekermannLowDensityIterateMany
bitset_benchmark_test.go:359
FunctionBenchmarkFlorianUekermannLowDensityIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:403
FunctionBenchmarkFlorianUekermannLowDensityIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:384
FunctionBenchmarkFlorianUekermannMidDensityIterateMany
Mid density go test -bench=BenchmarkFlorianUekermannMidDensityIterateMany
bitset_benchmark_test.go:422
FunctionBenchmarkFlorianUekermannMidDensityIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:467
FunctionBenchmarkFlorianUekermannMidDensityIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:448
FunctionBenchmarkFlorianUekermannMidStrongDensityIterateMany
High density
bitset_benchmark_test.go:485
FunctionBenchmarkFlorianUekermannMidStrongDensityIterateManyComp
(b *testing.B)
bitset_benchmark_test.go:530
FunctionBenchmarkFlorianUekermannMidStrongDensityIterateManyReg
(b *testing.B)
bitset_benchmark_test.go:511
FunctionBenchmarkGetTest
(b *testing.B)
bitset_benchmark_test.go:24
FunctionBenchmarkIsSuperSet
(b *testing.B)
bitset_benchmark_test.go:561
FunctionBenchmarkIter
(b *testing.B)
bitset_iter_test.go:88
FunctionBenchmarkIterate
go test -bench=Iterate
bitset_benchmark_test.go:59
FunctionBenchmarkLemireCount
go test -bench=LemireCount see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:201
FunctionBenchmarkLemireCreate
go test -bench=LemireCreate see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:190
FunctionBenchmarkLemireIterate
go test -bench=LemireIterate see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:218
FunctionBenchmarkLemireIterateManyb
go test -bench=BenchmarkLemireIterateManyb see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:257
FunctionBenchmarkLemireIterateb
go test -bench=LemireIterateb see https://lemire.me/blog/2016/09/22/swift-versus-java-the-bitset-performance-test/
bitset_benchmark_test.go:237
FunctionBenchmarkNonInter
(b *testing.B)
bitset_iter_test.go:104
FunctionBenchmarkPDEP
(b *testing.B)
bitset_test.go:2965
FunctionBenchmarkPEXT
(b *testing.B)
bitset_test.go:2951
FunctionBenchmarkRank
go test -bench=Rank
bitset_benchmark_test.go:659
FunctionBenchmarkSet
(b *testing.B)
bitset_benchmark_test.go:13
FunctionBenchmarkSetExpand
(b *testing.B)
bitset_benchmark_test.go:35
FunctionBenchmarkSetVsSetRange
(b *testing.B)
bitset_benchmark_test.go:674
FunctionBenchmarkSparseIterate
go test -bench=SparseIterate
bitset_benchmark_test.go:75
FunctionExample
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
FunctionExampleBitSet_Any
ExampleBitSet_Any shows the emptiness predicates. All, Any and None answer "are all/any/no bits set?".
example_test.go:182
FunctionExampleBitSet_Clear
ExampleBitSet_Clear turns an individual bit off.
example_test.go:62
FunctionExampleBitSet_Complement
ExampleBitSet_Complement flips every bit within the set's length.
example_test.go:163
FunctionExampleBitSet_Count
ExampleBitSet_Count reports the number of set bits (the cardinality).
example_test.go:88
FunctionExampleBitSet_Difference
ExampleBitSet_Difference returns the bits set in a but not in b.
example_test.go:146
FunctionExampleBitSet_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
FunctionExampleBitSet_Flip
ExampleBitSet_Flip toggles a single bit.
example_test.go:70
FunctionExampleBitSet_FlipRange
ExampleBitSet_FlipRange toggles every bit in the half-open range [start, end).
example_test.go:80
FunctionExampleBitSet_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
FunctionExampleBitSet_Intersection
ExampleBitSet_Intersection returns a new set containing the bits set in both.
example_test.go:138
FunctionExampleBitSet_IsSuperSet
ExampleBitSet_IsSuperSet reports whether every bit of other is also set here.
example_test.go:195
FunctionExampleBitSet_Len
()
bitset_test.go:112
FunctionExampleBitSet_MarshalJSON
ExampleBitSet_MarshalJSON round-trips a BitSet through JSON. BitSet implements json.Marshaler and json.Unmarshaler.
example_test.go:262
FunctionExampleBitSet_NextClear
ExampleBitSet_NextClear finds the first clear (unset) bit at or after i.
example_test.go:121
FunctionExampleBitSet_NextSet
ExampleBitSet_NextSet is the idiomatic way to iterate over the set bits in ascending order on any Go version.
example_test.go:96
FunctionExampleBitSet_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
FunctionExampleBitSet_Rank
ExampleBitSet_Rank counts how many bits are set at or below the given index.
example_test.go:210
FunctionExampleBitSet_Select
ExampleBitSet_Select returns the index of the j-th set bit (0-indexed).
example_test.go:222
FunctionExampleBitSet_Set
ExampleBitSet_Set demonstrates chaining, which works because Set (and Clear, Flip, ...) return the receiver.
example_test.go:54
FunctionExampleBitSet_String
ExampleBitSet_String renders the set in mathematical set notation.
example_test.go:203
FunctionExampleBitSet_SymmetricDifference
ExampleBitSet_SymmetricDifference returns the bits set in exactly one of the two sets.
example_test.go:155
FunctionExampleBitSet_Union
ExampleBitSet_Union returns a new set containing every bit set in either set.
example_test.go:130
FunctionExampleBitSet_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
FunctionExampleFrom
ExampleFrom builds a BitSet directly from packed 64-bit words, which is handy when interoperating with other bitmap representations.
example_test.go:45
FunctionExampleNew
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
FunctionFuzzBasicOps
FuzzBasicOps tests basic set, clear, test operations
bitset_fuzz_test.go:19
FunctionFuzzCapacityAndGrowth
FuzzCapacityAndGrowth tests capacity management and memory growth
bitset_fuzz_test.go:627
FunctionFuzzCopy
FuzzCopy tests clone and copy operations
bitset_fuzz_test.go:433
FunctionFuzzIterationConsistency
FuzzIterationConsistency tests that iteration methods return consistent results
bitset_fuzz_test.go:692
FunctionFuzzModification
FuzzModification tests insert/delete operations
bitset_fuzz_test.go:344
FunctionFuzzNavigation
FuzzNavigation tests Next/Previous operations
bitset_fuzz_test.go:206
FunctionFuzzRandomOperations
FuzzRandomOperations performs random sequences of operations
bitset_fuzz_test.go:555
FunctionFuzzRange
FuzzRange tests range operations like FlipRange
bitset_fuzz_test.go:69
FunctionFuzzSelect
(f *testing.F)
bitset_fuzz_test.go:400
FunctionFuzzSerialization
FuzzSerialization tests JSON marshaling/unmarshaling and other serialization
bitset_fuzz_test.go:496
FunctionFuzzSetOperations
FuzzSetOperations tests set operations like Union, Intersection, Difference
bitset_fuzz_test.go:115
FunctionFuzzShift
FuzzShift tests shift operations
bitset_fuzz_test.go:281
FunctionFuzzStringRepresentations
FuzzStringRepresentations tests string and dump operations
bitset_fuzz_test.go:780
FunctionTestAll
(t *testing.T)
bitset_test.go:897
FunctionTestAppendTo
(t *testing.T)
bitset_test.go:506
FunctionTestAsSlice
(t *testing.T)
bitset_test.go:544
FunctionTestBinaryOrder
(t *testing.T)
bitset_test.go:3335
FunctionTestBitSetAndGet
(t *testing.T)
bitset_test.go:166
FunctionTestBitSetDeposit
(t *testing.T)
bitset_test.go:3172
FunctionTestBitSetExtract
(t *testing.T)
bitset_test.go:3058
FunctionTestBitSetHuge
(t *testing.T)
bitset_test.go:76
FunctionTestBitSetIsClear
(t *testing.T)
bitset_test.go:122
FunctionTestBitSetNew
(t *testing.T)
bitset_test.go:69
FunctionTestBitSetOnesBetween
(t *testing.T)
bitset_test.go:2846
FunctionTestBytes
Bytes is deprecated
bitset_test.go:1903
FunctionTestCap
(t *testing.T)
bitset_test.go:1918
FunctionTestChain
(t *testing.T)
bitset_test.go:616
FunctionTestClearAll
(t *testing.T)
bitset_test.go:1952
← previousnext →101–200 of 342, ranked by callers