File tree 3 files changed +15
-15
lines changed
3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ z.all1() // false
93
93
var smallBitSet = BitSet ( size: 16 )
94
94
smallBitSet [ 5 ] = true
95
95
smallBitSet [ 10 ] = true
96
- print ( smallBitSet >> 3 )
97
- print ( smallBitSet << 6 ) // one bit shifts off the end
96
+ print ( smallBitSet >> 3 )
97
+ print ( smallBitSet << 6 ) // one bit shifts off the end
98
98
99
99
var bigBitSet = BitSet ( size: 120 )
100
100
bigBitSet [ 1 ] = true
@@ -104,8 +104,8 @@ bigBitSet[32] = true
104
104
bigBitSet [ 55 ] = true
105
105
bigBitSet [ 64 ] = true
106
106
bigBitSet [ 80 ] = true
107
- print ( bigBitSet )
108
- print ( bigBitSet << 32 )
109
- print ( bigBitSet << 64 )
110
- print ( bigBitSet >> 32 )
111
- print ( bigBitSet >> 64 )
107
+ print ( bigBitSet)
108
+ print ( bigBitSet << 32 )
109
+ print ( bigBitSet << 64 )
110
+ print ( bigBitSet >> 32 )
111
+ print ( bigBitSet >> 64 )
Original file line number Diff line number Diff line change @@ -235,10 +235,10 @@ public func << (lhs: BitSet, numBitsLeft: Int) -> BitSet {
235
235
let shift = numBitsLeft % lhs. N
236
236
for i in 0 ..< lhs. words. count {
237
237
out. words [ i] = 0
238
- if ( i - offset >= 0 ) {
238
+ if ( i - offset >= 0 ) {
239
239
out. words [ i] = lhs. words [ i - offset] << shift
240
240
}
241
- if ( i - offset - 1 >= 0 ) {
241
+ if ( i - offset - 1 >= 0 ) {
242
242
out. words [ i] |= lhs. words [ i - offset - 1 ] >> ( lhs. N - shift)
243
243
}
244
244
}
@@ -253,10 +253,10 @@ public func >> (lhs: BitSet, numBitsRight: Int) -> BitSet {
253
253
let shift = numBitsRight % lhs. N
254
254
for i in 0 ..< lhs. words. count {
255
255
out. words [ i] = 0
256
- if ( i + offset < lhs. words. count ) {
256
+ if ( i + offset < lhs. words. count) {
257
257
out. words [ i] = lhs. words [ i + offset] >> shift
258
258
}
259
- if ( i + offset + 1 < lhs. words. count ) {
259
+ if ( i + offset + 1 < lhs. words. count) {
260
260
out. words [ i] |= lhs. words [ i + offset + 1 ] << ( lhs. N - shift)
261
261
}
262
262
}
Original file line number Diff line number Diff line change @@ -235,10 +235,10 @@ public func << (lhs: BitSet, numBitsLeft: Int) -> BitSet {
235
235
let shift = numBitsLeft % lhs. N
236
236
for i in 0 ..< lhs. words. count {
237
237
out. words [ i] = 0
238
- if ( i - offset >= 0 ) {
238
+ if ( i - offset >= 0 ) {
239
239
out. words [ i] = lhs. words [ i - offset] << shift
240
240
}
241
- if ( i - offset - 1 >= 0 ) {
241
+ if ( i - offset - 1 >= 0 ) {
242
242
out. words [ i] |= lhs. words [ i - offset - 1 ] >> ( lhs. N - shift)
243
243
}
244
244
}
@@ -253,10 +253,10 @@ public func >> (lhs: BitSet, numBitsRight: Int) -> BitSet {
253
253
let shift = numBitsRight % lhs. N
254
254
for i in 0 ..< lhs. words. count {
255
255
out. words [ i] = 0
256
- if ( i + offset < lhs. words. count ) {
256
+ if ( i + offset < lhs. words. count) {
257
257
out. words [ i] = lhs. words [ i + offset] >> shift
258
258
}
259
- if ( i + offset + 1 < lhs. words. count ) {
259
+ if ( i + offset + 1 < lhs. words. count) {
260
260
out. words [ i] |= lhs. words [ i + offset + 1 ] << ( lhs. N - shift)
261
261
}
262
262
}
You can’t perform that action at this time.
0 commit comments