Types
TBitSetView = openArray[ElemType]
- A view into a bit set. This doesn't necessarily have to be a TBitSet, but can be any byte sequence storing representing a bit set Source Edit
Procs
func bitSetCard(x: TBitSetView): BiggestInt {....raises: [], tags: [].}
- Calculates the number of elements in the x Source Edit
func bitSetContains(x, y: TBitSetView): bool {....raises: [], tags: [].}
- Tests if y is a subset x Source Edit
func bitSetDiff(x: var TBitSetView; y: TBitSetView) {....raises: [], tags: [].}
- Calculates the difference between sets x and y and stores the result in x Source Edit
func bitSetEquals(x, y: TBitSetView): bool {....raises: [], tags: [].}
- Set equality test. Evaluates to true ff all elements (bits) in x are also in y and both sets have the same number of elements Source Edit
func bitSetExcl(x: var TBitSetView; elem: BiggestInt) {....raises: [], tags: [].}
- If elem is in set x, removes it, otherwise does nothing Source Edit
func bitSetIn(x: TBitSetView; e: BiggestInt): bool {....raises: [], tags: [].}
- Tests if e is an element of x Source Edit
func bitSetIncl(x: var TBitSetView; elem: BiggestInt) {....raises: [], tags: [].}
- If elem is not in set x yet, includes the element Source Edit
func bitSetInclRange(x: var TBitSetView; s: Slice[BiggestInt]) {....raises: [], tags: [].}
- Includes elements in the slice r that aren't part of x yet into x Source Edit
func bitSetInit(b: var TBitSet; length: int) {....raises: [], tags: [].}
- Creates a new bitset in b with a size-in-bytes of length * ElemSize . The resulting bitset allows for elements in the range 0..<(length * ElemSize * 8) Source Edit
func bitSetIntersect(x: var TBitSetView; y: TBitSetView) {....raises: [], tags: [].}
- Calculates the set intersection between x and y and store the result in x Source Edit
func bitSetSymDiff(x: var TBitSetView; y: TBitSetView) {....raises: [], tags: [].}
- Calculates the symmetric set difference between x and y and store the result in x Source Edit
func bitSetUnion(x: var TBitSetView; y: TBitSetView) {....raises: [], tags: [].}
- Calculate the union between sets x and y Source Edit