MCPcopy Index your code

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

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

↓ 292 callersMethodSet
Set bit i to 1, the capacity of the bitset is automatically increased accordingly. Warning: using a very large value for 'i' may lead to a memory shor
bitset.go:263
↓ 222 callersFunctionNew
New creates a new BitSet with a hint that length bits will be required. The memory usage is at least length/8 bytes. In case of allocation failure, th
bitset.go:165
↓ 116 callersMethodTest
Test whether bit i is set.
bitset.go:230
↓ 89 callersMethodCount
Count (number of set bits). Also known as "popcount" or "population count".
bitset.go:845
↓ 43 callersMethodLen
Len returns the number of bits in the BitSet. Note that it differ from Count function.
bitset.go:207
↓ 37 callersFunctionpanicIfNull
(b *BitSet)
bitset.go:880
↓ 36 callersMethodEqual
Equal tests the equivalence of two BitSets. False if they are of different sizes, otherwise true only if all the same bits are set
bitset.go:855
↓ 30 callersMethodNextSet
NextSet returns the next bit set from the specified index, including possibly the current index along with an error code (true = valid, false = no set
bitset.go:574
↓ 24 callersMethodwordCount
wordCount returns the number of words used in a bit set
bitset.go:787
↓ 20 callersMethodClone
Clone this BitSet, returning a new BitSet that has the same bits set. In case of allocation failure, the function will return an empty BitSet.
bitset.go:793
↓ 19 callersFunctionwordsIndex
wordsIndex calculates the index of words in a `uint64`
bitset.go:157
↓ 18 callersMethodDumpAsBits
DumpAsBits dumps a bit set as a string of bits. Following the usual convention in Go, the least significant bits are printed last (index 0 is at the e
bitset.go:1196
↓ 16 callersMethodSetTo
SetTo sets bit i to value. Warning: using a very large value for 'i' may lead to a memory shortage and a panic: the caller is responsible for providin
bitset.go:284
↓ 14 callersFunctionFrom
From is a constructor used to create a BitSet from an array of words
bitset.go:109
↓ 13 callersMethodClear
Clear bit i to 0. This never cause a memory allocation. It is always safe.
bitset.go:272
↓ 13 callersMethodNextClear
NextClear returns the next clear bit from the specified index, including possibly the current index along with an error code (true = valid, false = no
bitset.go:674
↓ 12 callersMethodNextSetMany
NextSetMany returns many next bit sets from the specified index, including possibly the current index and up to cap(buffer). If the returned slice has
bitset.go:622
↓ 10 callersMethodShrink
Shrink shrinks BitSet so that the provided value is the last possible set value. It clears all bits > the provided index and reduces the size and leng
bitset.go:377
↓ 10 callersFunctionwordsNeeded
wordsNeeded calculates the number of words needed for i bits
bitset.go:143
↓ 9 callersMethodBytes
Bytes 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:131
↓ 9 callersMethodFlipRange
FlipRange bit in [start, end). Warning: using a very large value for 'end' may lead to a memory shortage and a panic: the caller is responsible for pr
bitset.go:307
↓ 8 callersFunctionCap
Cap returns the total possible capacity, or number of bits that can be stored in the BitSet theoretically. Under 32-bit system, it is 4294967295 and u
bitset.go:201
↓ 8 callersMethodDifferenceCardinality
DifferenceCardinality computes the cardinality of the difference
bitset.go:903
↓ 8 callersMethodIntersectionCardinality
IntersectionCardinality computes the cardinality of the intersection
bitset.go:965
↓ 8 callersFunctionpopcntSlice
(s []uint64)
popcnt.go:5
↓ 7 callersMethodIntersection
Intersection of base set and other set This is the BitSet equivalent of & (and) In case of allocation failure, the function will return an empty BitSe
bitset.go:953
↓ 7 callersMethodNone
None returns true if no bit is set, false otherwise. Returns true for empty sets.
bitset.go:1156
↓ 7 callersMethodString
String creates a string representation of the BitSet. It is only intended for human-readable output and not for serialization.
bitset.go:462
↓ 7 callersMethodSymmetricDifferenceCardinality
SymmetricDifferenceCardinality computes the cardinality of the symmetric difference
bitset.go:1081
↓ 7 callersMethodUnionCardinality
UnionCardinality computes the cardinality of the uniton of the base set and the compare set.
bitset.go:1023
↓ 6 callersMethodCopy
Copy into a destination BitSet using the Go array copy semantics: the number of bits copied is the minimum of the number of bits in the current BitSet
bitset.go:805
↓ 6 callersMethodExtractTo
ExtractTo copies bits from the BitSet using positions specified in mask into a compacted form in dst. The number of set bits in mask determines the nu
bitset.go:1625
↓ 6 callersMethodSelect
Select returns the index of the jth set bit, where j is the argument. The caller is responsible to ensure that 0 <= j < Count(): when j is out of rang
bitset.go:1441
↓ 6 callersMethodextendSet
extendSet adds additional words to incorporate new bits if needed
bitset.go:212
↓ 6 callersFunctionsortByLength
Convenience function: return two bitsets ordered by increasing length. Note: neither can be nil
bitset.go:941
↓ 5 callersMethodAll
All returns true if all bits are set, false otherwise. Returns true for empty sets.
bitset.go:1149
↓ 5 callersMethodBinaryStorageSize
BinaryStorageSize returns the binary storage requirements (see WriteTo) in bytes.
bitset.go:1209
↓ 5 callersMethodClearAll
ClearAll clears the entire BitSet. It does not free the memory.
bitset.go:765
↓ 5 callersMethodDepositTo
DepositTo spreads bits from a compacted form in the BitSet into positions specified by mask in dst. This is the inverse operation of Extract. For exa
bitset.go:1684
↓ 5 callersMethodDifference
Difference of base set and other set This is the BitSet equivalent of &^ (and not)
bitset.go:888
↓ 5 callersMethodPreviousSet
PreviousSet returns the previous set bit from the specified index, including possibly the current index along with an error code (true = valid, false
bitset.go:711
↓ 5 callersMethodReadFrom
ReadFrom reads a BitSet from a stream written using WriteTo The format is: 1. uint64 length 2. []uint64 set See WriteTo for details. Upon success, the
bitset.go:1310
↓ 5 callersMethodSymmetricDifference
SymmetricDifference of base set and other set This is the BitSet equivalent of ^ (xor)
bitset.go:1068
↓ 5 callersMethodUnion
Union of base set and other set This is the BitSet equivalent of | (or)
bitset.go:1010
↓ 4 callersMethodDeleteAt
DeleteAt deletes the bit at the given index position from within the bitset All the bits residing on the left of the deleted bit get shifted right by
bitset.go:492
↓ 4 callersMethodFlip
Flip bit at i. Warning: using a very large value for 'i' may lead to a memory shortage and a panic: the caller is responsible for providing sensible p
bitset.go:295
↓ 4 callersMethodInPlaceIntersection
InPlaceIntersection destructively computes the intersection of base set and the compare set. This is the BitSet equivalent of & (and)
bitset.go:979
↓ 4 callersMethodMarshalBinary
MarshalBinary encodes a BitSet into a binary form and returns the result. Please see WriteTo for details.
bitset.go:1350
↓ 4 callersMethodPreviousClear
PreviousClear returns the previous clear bit from the specified index, including possibly the current index along with an error code (true = valid, fa
bitset.go:736
↓ 4 callersMethodRank
Rank returns the number of set bits up to and including the index that are set in the bitset. See https://en.wikipedia.org/wiki/Ranking#Ranking_in_sta
bitset.go:1402
↓ 4 callersMethodWriteTo
WriteTo writes a BitSet to a stream. The format is: 1. uint64 length 2. []uint64 set The length is the number of bits in the BitSet. The set is a sli
bitset.go:1275
↓ 4 callersFunctiongood
function provided by FlorianUekermann
bitset_benchmark_test.go:330
↓ 4 callersFunctionpext
go:generate go run cmd/pextgen/main.go -pkg=bitset
bitset.go:1730
↓ 3 callersMethodAsSlice
AsSlice returns all set bits as slice. It panics if the capacity of buf is < b.Count() See also [BitSet.AppendTo] and [BitSet.NextSetMany].
bitset.go:547
↓ 3 callersMethodCompact
Compact shrinks BitSet to so that we preserve all set bits, while minimizing memory usage. Compact calls Shrink. A new slice is allocated to store the
bitset.go:401
↓ 3 callersMethodComplement
Complement computes the (local) complement of a bitset (up to length bits) In case of allocation failure, the function will return an empty BitSet.
bitset.go:1137
↓ 3 callersFunctionFromWithLength
FromWithLength constructs from an array of words and length in bits. This function is for advanced users, most users should prefer the From function.
bitset.go:119
↓ 3 callersMethodInPlaceDifference
InPlaceDifference computes the difference of base set and other set This is the BitSet equivalent of &^ (and not)
bitset.go:920
↓ 3 callersMethodInPlaceSymmetricDifference
InPlaceSymmetricDifference creates the destructive SymmetricDifference of base set and other set This is the BitSet equivalent of ^ (xor)
bitset.go:1097
↓ 3 callersMethodInPlaceUnion
InPlaceUnion creates the destructive union of base set and compare set. This is the BitSet equivalent of | (or).
bitset.go:1039
↓ 3 callersMethodInsertAt
InsertAt takes an index which indicates where a bit should be inserted. Then it shifts all the bits in the set to the left by 1, starting from the giv
bitset.go:423
↓ 3 callersMethodIsSuperSet
IsSuperSet returns true if this is a superset of the other set
bitset.go:1175
↓ 3 callersMethodOnesBetween
OnesBetween returns the number of set bits in the range [from, to). The range is inclusive of 'from' and exclusive of 'to'. Returns 0 if from >= to.
bitset.go:1569
↓ 3 callersMethodShiftRight
ShiftRight shifts the bitset like >> operation would do.
bitset.go:1525
↓ 3 callersMethodcleanLastWord
Clean last word by setting unused bits to 0
bitset.go:1129
↓ 3 callersFunctioncopyBinary
(t *testing.T, from encoding.BinaryMarshaler, to encoding.BinaryUnmarshaler)
bitset_test.go:1656
↓ 3 callersFunctionmax
Helper function for max
bitset_fuzz_test.go:488
↓ 3 callersFunctionpdep
(w, m uint64)
bitset.go:1749
↓ 3 callersFunctionsetRnd
(bits []uint64, halfings int)
bitset_benchmark_test.go:281
↓ 2 callersMethodAppendTo
AppendTo appends all set bits to buf and returns the (maybe extended) buf. In case of allocation failure, the function will panic. See also [BitSet.A
bitset.go:527
↓ 2 callersMethodCopyFull
CopyFull copies into a destination BitSet such that the destination is identical to the source after the operation, allocating memory if necessary.
bitset.go:824
↓ 2 callersMethodEachSet
()
bitset_iter.go:11
↓ 2 callersMethodIsStrictSuperSet
IsStrictSuperSet returns true if this is a strict superset of the other set
bitset.go:1189
↓ 2 callersFunctionMustNew
MustNew creates a new BitSet with the given length bits. It panics if length exceeds the possible capacity or by a lack of memory.
bitset.go:185
↓ 2 callersMethodSetAll
SetAll sets the entire BitSet
bitset.go:775
↓ 2 callersMethodShiftLeft
ShiftLeft shifts the bitset like << operation would do. Left shift may require bitset size extension. We try to avoid the unnecessary memory operatio
bitset.go:1469
↓ 2 callersMethodUnmarshalBinary
UnmarshalBinary decodes the binary form generated by MarshalBinary. Please see WriteTo for details.
bitset.go:1362
↓ 2 callersFunctiongeneratePextTestCases
(n int)
bitset_test.go:2715
↓ 2 callersMethodisLenExactMultiple
Is the length an exact multiple of word sizes?
bitset.go:1124
↓ 2 callersFunctionpopcntAndSlice
popcntAndSlice computes the population count of the AND of two slices. It assumes that len(m) >= len(s) > 0.
popcnt.go:48
↓ 2 callersFunctionpopcntMaskSlice
(s, m []uint64)
popcnt.go:25
↓ 2 callersFunctionpopcntOrSlice
popcntOrSlice computes the population count of the OR of two slices. It assumes that len(m) >= len(s) > 0.
popcnt.go:59
↓ 2 callersFunctionpopcntXorSlice
popcntXorSlice computes the population count of the XOR of two slices. It assumes that len(m) >= len(s) > 0.
popcnt.go:70
↓ 2 callersMethodtop
top detects the top bit set
bitset.go:1454
↓ 1 callersMethodAny
Any returns true if any bit is set, false otherwise
bitset.go:1169
↓ 1 callersFunctionBase64StdEncoding
Base64StdEncoding Marshal/Unmarshal BitSet with base64.StdEncoding(Default: base64.URLEncoding)
bitset.go:73
↓ 1 callersMethodGetWord64AtBit
GetWord64AtBit retrieves bits i through i+63 as a single uint64 value
bitset.go:238
↓ 1 callersFunctionLittleEndian
LittleEndian sets Marshal/Unmarshal Binary as Little Endian (Default: binary.BigEndian)
bitset.go:76
↓ 1 callersMethodMarshalJSON
MarshalJSON marshals a BitSet as a JSON structure
bitset.go:1369
↓ 1 callersMethodRead
(b []byte)
bitset_test.go:2246
↓ 1 callersMethodSetBitsetFrom
SetBitsetFrom fills the bitset with an array of integers without creating a new BitSet instance
bitset.go:103
↓ 1 callersMethodUnmarshalJSON
UnmarshalJSON unmarshals a BitSet from JSON created using MarshalJSON
bitset.go:1381
↓ 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:138
↓ 1 callersFunctiongenerateTable
(name string, data interface{}, comment string)
cmd/pextgen/main.go:40
↓ 1 callersFunctiononScroll
()
docs/main.js:50
↓ 1 callersFunctionpdepByte
pdepByte handles single-byte PDEP operation
cmd/pextgen/main.go:27
↓ 1 callersFunctionpextByte
pextByte handles single-byte PEXT operation
cmd/pextgen/main.go:13
↓ 1 callersFunctionreadUint64Array
(reader io.Reader, data []uint64)
bitset.go:1213
↓ 1 callersMethodsafeSet
safeSet will fixup b.set to be non-nil and return the field value
bitset.go:95
↓ 1 callersFunctionselect64
(w uint64, j uint)
select.go:5
next →1–100 of 266, ranked by callers