// Returns a slice of all numbers in the set
Returns a slice of all numbers in the set
// Returns a slice of all numbers in the set
func (bs *Bitset) GetAll() (s []int) {
	if bs.count == 0 {
		return
	}
	s = make([]int, 0, bs.count)
	for i, w := range bs.words {
		for {
			if w == 0 {
				break
			}
			bit := ffs(w)
			num := i*bitsPerWord + int(bit)
			if num > bs.max {
				return
			}
			s = append(s, num)
			w &= ^(1 << bit)
		}
	}
	return
}
func ( bs * Bitset ) GetAll ( ) ( s [ ] int ) { if bs . count == 0 { return } s = make ( [ ] int , 0 , bs . count ) for i , w := range bs . words { for { if w == 0 { break } bit := ffs ( w ) num := i * bitsPerWord + int ( bit ) if num > bs . max { return } s = append ( s , num ) w &= ^ ( 1 << bit ) } } return }
Returns a slice of all numbers in the set
Returns a slice of all numbers in the set